VS.NET 2005 is ignoring in web.config strict="true". I get no error when I try this: Dim x As Integer = "string"

Hello,

I have this in my VS.NET 2005 web.config

<compilation debug="true" strict="true" explicit="true">

When I do this in my vb code:

Dim x As Integer = "string"

I get no error. When I hit compilation I also get no error.
What am I doing wrong?

Thanks for helping!

Regards,
J. Bauer

0
joergbauer
1/14/2006 7:14:43 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

6 Replies
1287 Views

Similar Articles

[PageSpeed] 41

It's a bug of some sort

See this response by Scott Guthrie

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=3c1c9898-8076-4f69-a5e2-e99573d03c6e

Unfortunately we don’t have a GUI based way to configure this. L It is something we will make sure gets added back in, though, with the next release.

There are two suggestions I can make in the meantime:

1) You can modify the default templates within your projects to have Option Strict On by default. You can find these templates under your C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VWDExpress\ItemTemplates\Web\VisualBasic\1033 directory (just search for webform.aspx on your system to find them all).

2) You can enable option strict a compiler option by adding this to your web.config file in your application:

<configuration>
<system.codedom>
<compilers>
<compiler language="vb" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/optionstrict+"/>
</compilers>
</system.codedom>
</configuration>

Note that this second option will only validate your page during explicit “Build Page” or “Build Website” compilation checks. But it will provide a way to enforce Option Strict in your projects.

Hope this helps,

Scott


Thanks,

Teemu Keiski
Finland, EU
0
joteke
1/15/2006 9:35:49 AM

Hi Teemu,

Have you implemented this fix?  My web.config does not understand the <compilers> element.

Thanks

 


Jamie Kindred, CGA, MCSD
0
NetProfit
1/27/2006 6:53:19 PM
Yeah, I have. If I recall correctly, mine didn't neither but it worked. So if you don't get any specific errors while runninng it, don't mind about it. :-)
Thanks,

Teemu Keiski
Finland, EU
0
joteke
1/27/2006 6:59:22 PM
Thanks Teemu. It does run fine; I am just getting messages when I build my project. I thought it was preventing a build, but that was another problem.
Jamie Kindred, CGA, MCSD
0
NetProfit
1/28/2006 12:11:38 AM
Is this going to be a fix for the upcoming vs2005sp1 or vs2006? just wondering.

-Blake Niemyjski
Blog - Website: windowscoding.com
0
Blake05
1/28/2006 1:19:57 AM

Blake05 wrote:
Is this going to be a fix for the upcoming vs2005sp1 or vs2006? just wondering.

Based on information I got: This is going to be included in next SP for ASP.NET. It's independent of VS bits, so in practise it means next SP for .NET FX


Thanks,

Teemu Keiski
Finland, EU
0
joteke
1/29/2006 7:21:56 PM
Reply:

Similar Artilces:

Get "Mail"/"Get "News" / "Write"/"Post" buttons?
If the "Get Mail" button text changed to "Get News", and "Write" changed to "Post" when TB's in the news-reading mode, it would save me and probably others from constantly forgetting to make the change before proceeding. :-) Or is there an extension to do this which I don't know about? Thanks! Bob Bob P wrote: > If the "Get Mail" button text changed to "Get News", and "Write" > changed to "Post" when TB's in the news-reading mode, it would save me > and probably others...

"Get Mail" vs "Get All New Messages"
I have a few different email accounts set up in Thunderbird, and I'm using the unified view to view them. Recently, I noticed that the "Get Mail" button seems to only retrieve email for the first account (sometimes?). I'd like to click on that button and retrieve email for all of the accounts. I can get the behavior that I want consistently if I pull down the menu for "Get Mail" and select "Get All New Messages", but I'd prefer to get that in a single click if possible. I tried starting from scratch and recreating my profile, but I st...

Trying to change the Register link to "signup" or "get started"
Can someone please tell me where to change the text for the Register link. I would rather it say "signup" or "Get Started" or something. I have spent a long time looking for a place to change this, but im stumped. Any help is appreciated You can do this by modifying the resource file for the User control.  This is how it is accomplished: Goto the menu:  Admin->Languages. Open:  Local Resources->Admin->Skins->User.ascx.  It will ask you to "You are about to create a custom localized file for this portal. Are you sure you want to overload default localized fil...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

I am getting "it is read only" error when I am trying to use " if (Request.IsAuthenticated=false) "
hi, I am trying to use, if (Request.IsAuthenticated=false) but while using it I am geting the error, CS0200: Property or indexer 'System.Web.HttpRequest.IsAuthenticated' cannot be assigned to -- it is read only Could anyone please help Digish you need to use == when doing a comparison.  a single = is an assignment if (Request.IsAuthenticated==false) Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/ Hi mbanavige,   thankyou for the above help. really saved my wo...

"x = " vs. "var x = "
Just a quick q: why does the expression "var x = 5" return "undefined"? The expression "x = 5" returns 5, as I would expect. Inside jsshell "var x = 5" doesn't print a value (I assume it's suppressing undefined results). Sterling Sterling Bates wrote: > Just a quick q: why does the expression "var x = 5" return "undefined"? This is not an expression. This is a statement, declaring a variable x initializing it with 5. > The expression "x = 5" returns 5, as I would expect. This is an e...

pulling out "a","an", "the" from beginning of strings
I need to pull out articles "a", "an", and "the" from the beginning of title strings so that they sort properly in MySQL. What is the best way to accomplish that if I have a single $scalar with the whole title in it? Thanks, Tim -- Tim McGeary tim.mcgeary@lehigh.edu --=-A0sE7VNm/n2AMknlC2yn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, 2004-08-24 at 15:04, Tim McGeary wrote: > I need to pull out articles "a", "an", and "the" from the beginning of=20 >...

Programmatically Populating the "mail.settings" section of "system.net" in web.config
I am fully aware that the system.net section of web.config typically looks something like this:  <system.net>    <mailSettings>      <smtp from="noreply@sample.com">        <network host="smtp_server_address" userName="myUsername" password="myPassword" />      </smtp>    </mailSettings>  </system.net>If web.config is so populated then this info is used for sending e-mails generally and al...

Feature Request: "Get Extensions" and "Get Themes"
I think that when you click on the "Get Extensions" or "Get Themes" links, it should open depending on your default window-opening behavior. For example, all new windows for me open up in new tabs. However, when I click the "Get" links, they always open in new windows. I can't even find an extension to do this. How hard would this be to incorporate natively? ...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

Getting "Problem in Mapping Fragment starting at line ..." error when trying to create table mappings for table associations in ADO.NET Entity Framework
 Table A: COUNTRY_LOOKUP COUNTRY_ID   smallintclustered, unique, primary key located on PRIMARY    COUNTRY_ID TABLE B: COUNTRY_MODE_RULES CARRIER_ID    intMODE_RULE_TYPE_ID    intORIG_COUNTRY_ID    smallintDEST_COUNTRY_ID    smallint clustered, unique, primary key located on PRIMARY    CARRIER_ID, MODE_RULE_TYPE_ID, ORIG_COUNTRY_ID, DEST_COUNTRY_IDThere is a foreign key relationship from COUNTRY_MODE_RULES to COUNTRY_LOOKUPORIG_COUNTRY_IDREFERENCES .COUNTRY_LOOKUP (COUNTRY_ID)DEST_CO...

Script to perform a "Get latest", then a "Build", then a "Publish"
I frequently have to copy out of source safe, the latest version of some source code. Then perform a build and then a publish. The publish is published to a local directory where I then copy it out to a server. This is a bit of a hassle to have to do all of this mannualy. What I would prefer to do is to use some type of script that would do this. Does anyone know if this is possible? I can manage copying to the server. I just need a script that I could kick off to do the following. 1. Copy the latest source code for the project out of source safe. 2. Perform a build of the projec...

Trying to transfer a Web Service made in .NET aspx on my "localhost", to online and getting BC30002: Type 'localhost.Convert' is not defined. error
I think I get the general idea of this error.  The webservice works on my computer as Visual Web Developer somehow makes a temporary server out of my computer.  But when I try to FTP my full ASP page I get an error that localhost is not defined.  This makes sense as I am sure the web server for GoDaddy is not called localhost for me.  Now in my App_WebReferences folder in my program I have a local host folder that holds 3 automatically generated files which are somehow "calls" to a webservice that I built.  So I have the original files for the webservi...

Web resources about - VS.NET 2005 is ignoring in web.config strict="true". I get no error when I try this: Dim x As Integer = "string" - asp.net.getting-started

Resources last updated: 11/24/2015 11:55:13 PM