![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | web.config vs. My Project When creating a new VB Web Application Project with VS2008, there are several settings (compiler settings, option strict, etc) that appear both in the web.config file and "My Project". I'm wondering what takes precedent, what the benefit of using one vs. the other is, and what happens if they conflict? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: web.config vs. My Project "My Project" is meant to be the way to set your preferences, rather than going into configuration files and editing them manually. You shouldn't ever have to go into web.config to set option strict because you can do it in the My Project dialgogs. I don't think you can have a conflict because for things that are in web.config and My Project, changing the setting in one will cause it to change in the other. "MCM" <MCM@xxxxxx> wrote in message news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx Quote: > When creating a new VB Web Application Project with VS2008, there are > several > settings (compiler settings, option strict, etc) that appear both in the > web.config file and "My Project". I'm wondering what takes precedent, what > the benefit of using one vs. the other is, and what happens if they > conflict? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: web.config vs. My Project That is incorrect. I agree that My Project is meant to be a method of editing config files, but not web.config. Check for yourself. Perhaps it edits app.config? That would make sense. "Scott M." wrote: Quote: > "My Project" is meant to be the way to set your preferences, rather than > going into configuration files and editing them manually. You shouldn't > ever have to go into web.config to set option strict because you can do it > in the My Project dialgogs. > > I don't think you can have a conflict because for things that are in > web.config and My Project, changing the setting in one will cause it to > change in the other. > > > "MCM" <MCM@xxxxxx> wrote in message > news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx Quote: > > When creating a new VB Web Application Project with VS2008, there are > > several > > settings (compiler settings, option strict, etc) that appear both in the > > web.config file and "My Project". I'm wondering what takes precedent, what > > the benefit of using one vs. the other is, and what happens if they > > conflict? > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: web.config vs. My Project Try That is what we have to do too. Cor "MCM" <MCM@xxxxxx> schreef in bericht news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx Quote: > When creating a new VB Web Application Project with VS2008, there are > several > settings (compiler settings, option strict, etc) that appear both in the > web.config file and "My Project". I'm wondering what takes precedent, what > the benefit of using one vs. the other is, and what happens if they > conflict? |
My System Specs![]() |
| | #5 (permalink) |
| | Re: web.config vs. My Project No, I'm sorry, but you are incorrect. Perhaps you misunderstood what I said. I didn't say that we should never have to edit web.config directly. My comments were about your particular Option Strict, etc. settings. You should never have to go into web.config to turn Option Strict (and various other settings) on or off, that is what My Project dialogs are for and if you change it in one, it will be refelcted in the other. -Scott "MCM" <MCM@xxxxxx> wrote in message news:AD2A4EBA-F95F-4A53-AA21-17FD53A1E2EB@xxxxxx Quote: > That is incorrect. I agree that My Project is meant to be a method of > editing > config files, but not web.config. Check for yourself. Perhaps it edits > app.config? That would make sense. > > "Scott M." wrote: > Quote: >> "My Project" is meant to be the way to set your preferences, rather than >> going into configuration files and editing them manually. You shouldn't >> ever have to go into web.config to set option strict because you can do >> it >> in the My Project dialgogs. >> >> I don't think you can have a conflict because for things that are in >> web.config and My Project, changing the setting in one will cause it to >> change in the other. >> >> >> "MCM" <MCM@xxxxxx> wrote in message >> news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx Quote: >> > When creating a new VB Web Application Project with VS2008, there are >> > several >> > settings (compiler settings, option strict, etc) that appear both in >> > the >> > web.config file and "My Project". I'm wondering what takes precedent, >> > what >> > the benefit of using one vs. the other is, and what happens if they >> > conflict? >> >> |
My System Specs![]() |
| | #6 (permalink) |
| | Re: web.config vs. My Project I have litterally seen otherwise. I am looking at my code right now. I turn option strict on in one, and it is NOT reflected in the other. "Scott M." wrote: Quote: > No, I'm sorry, but you are incorrect. > > Perhaps you misunderstood what I said. I didn't say that we should never > have to edit web.config directly. My comments were about your particular > Option Strict, etc. settings. You should never have to go into web.config > to turn Option Strict (and various other settings) on or off, that is what > My Project dialogs are for and if you change it in one, it will be refelcted > in the other. > > -Scott > > "MCM" <MCM@xxxxxx> wrote in message > news:AD2A4EBA-F95F-4A53-AA21-17FD53A1E2EB@xxxxxx Quote: > > That is incorrect. I agree that My Project is meant to be a method of > > editing > > config files, but not web.config. Check for yourself. Perhaps it edits > > app.config? That would make sense. > > > > "Scott M." wrote: > > Quote: > >> "My Project" is meant to be the way to set your preferences, rather than > >> going into configuration files and editing them manually. You shouldn't > >> ever have to go into web.config to set option strict because you can do > >> it > >> in the My Project dialgogs. > >> > >> I don't think you can have a conflict because for things that are in > >> web.config and My Project, changing the setting in one will cause it to > >> change in the other. > >> > >> > >> "MCM" <MCM@xxxxxx> wrote in message > >> news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx > >> > When creating a new VB Web Application Project with VS2008, there are > >> > several > >> > settings (compiler settings, option strict, etc) that appear both in > >> > the > >> > web.config file and "My Project". I'm wondering what takes precedent, > >> > what > >> > the benefit of using one vs. the other is, and what happens if they > >> > conflict? > >> > >> > >> > > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: web.config vs. My Project Have you tried changing Option Stict in the designer withOUT web.config open in the editor and then opened web.config AFTER you've saved the designer dialog? "MCM" <MCM@xxxxxx> wrote in message news:25F9B76A-8B1E-4C40-80B3-DF3FAFBE065F@xxxxxx Quote: >I have litterally seen otherwise. I am looking at my code right now. I turn > option strict on in one, and it is NOT reflected in the other. > > "Scott M." wrote: > Quote: >> No, I'm sorry, but you are incorrect. >> >> Perhaps you misunderstood what I said. I didn't say that we should never >> have to edit web.config directly. My comments were about your particular >> Option Strict, etc. settings. You should never have to go into >> web.config >> to turn Option Strict (and various other settings) on or off, that is >> what >> My Project dialogs are for and if you change it in one, it will be >> refelcted >> in the other. >> >> -Scott >> >> "MCM" <MCM@xxxxxx> wrote in message >> news:AD2A4EBA-F95F-4A53-AA21-17FD53A1E2EB@xxxxxx Quote: >> > That is incorrect. I agree that My Project is meant to be a method of >> > editing >> > config files, but not web.config. Check for yourself. Perhaps it edits >> > app.config? That would make sense. >> > >> > "Scott M." wrote: >> > >> >> "My Project" is meant to be the way to set your preferences, rather >> >> than >> >> going into configuration files and editing them manually. You >> >> shouldn't >> >> ever have to go into web.config to set option strict because you can >> >> do >> >> it >> >> in the My Project dialgogs. >> >> >> >> I don't think you can have a conflict because for things that are in >> >> web.config and My Project, changing the setting in one will cause it >> >> to >> >> change in the other. >> >> >> >> >> >> "MCM" <MCM@xxxxxx> wrote in message >> >> news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx >> >> > When creating a new VB Web Application Project with VS2008, there >> >> > are >> >> > several >> >> > settings (compiler settings, option strict, etc) that appear both in >> >> > the >> >> > web.config file and "My Project". I'm wondering what takes >> >> > precedent, >> >> > what >> >> > the benefit of using one vs. the other is, and what happens if they >> >> > conflict? >> >> >> >> >> >> >> >> |
My System Specs![]() |
| | #8 (permalink) |
| | Re: web.config vs. My Project Yes. It does not change web.config. "Scott M." wrote: Quote: > Have you tried changing Option Stict in the designer withOUT web.config open > in the editor and then opened web.config AFTER you've saved the designer > dialog? > > > "MCM" <MCM@xxxxxx> wrote in message > news:25F9B76A-8B1E-4C40-80B3-DF3FAFBE065F@xxxxxx Quote: > >I have litterally seen otherwise. I am looking at my code right now. I turn > > option strict on in one, and it is NOT reflected in the other. > > > > "Scott M." wrote: > > Quote: > >> No, I'm sorry, but you are incorrect. > >> > >> Perhaps you misunderstood what I said. I didn't say that we should never > >> have to edit web.config directly. My comments were about your particular > >> Option Strict, etc. settings. You should never have to go into > >> web.config > >> to turn Option Strict (and various other settings) on or off, that is > >> what > >> My Project dialogs are for and if you change it in one, it will be > >> refelcted > >> in the other. > >> > >> -Scott > >> > >> "MCM" <MCM@xxxxxx> wrote in message > >> news:AD2A4EBA-F95F-4A53-AA21-17FD53A1E2EB@xxxxxx > >> > That is incorrect. I agree that My Project is meant to be a method of > >> > editing > >> > config files, but not web.config. Check for yourself. Perhaps it edits > >> > app.config? That would make sense. > >> > > >> > "Scott M." wrote: > >> > > >> >> "My Project" is meant to be the way to set your preferences, rather > >> >> than > >> >> going into configuration files and editing them manually. You > >> >> shouldn't > >> >> ever have to go into web.config to set option strict because you can > >> >> do > >> >> it > >> >> in the My Project dialgogs. > >> >> > >> >> I don't think you can have a conflict because for things that are in > >> >> web.config and My Project, changing the setting in one will cause it > >> >> to > >> >> change in the other. > >> >> > >> >> > >> >> "MCM" <MCM@xxxxxx> wrote in message > >> >> news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx > >> >> > When creating a new VB Web Application Project with VS2008, there > >> >> > are > >> >> > several > >> >> > settings (compiler settings, option strict, etc) that appear both in > >> >> > the > >> >> > web.config file and "My Project". I'm wondering what takes > >> >> > precedent, > >> >> > what > >> >> > the benefit of using one vs. the other is, and what happens if they > >> >> > conflict? > >> >> > >> >> > >> >> > >> > >> > >> > > |
My System Specs![]() |
| | #9 (permalink) |
| | Re: web.config vs. My Project Hi MCM, As for the compile options in "project properties" and web.config <compilation> element, they are actually different. To clarify the difference and how each of them will affect ASP.NET Web application project's output, it may require us to first go through the difference between "Web Application project" and the default "Web Site project" of ASP.NET 2.0 Web application. In ASP.NET 2.0, it by default use dynamic compilation, which means it doesn't generate precompiled assemblies in bin dir(like ASP.NET 1.1 /VS 2003). And that's just what you'll get when you create ASP.NET 2.0 web project via the "Web Site project" model. Later, the ASP.NET team add a new project model "Web Application project", this provide an ASP.NET 1.1/VS 2003 like model, at development time in IDE, you will be able to build/compile the website and get precompiled assembly in "bin" dir. However, the precompile only compile those codebehind classes or component classes(such as those ones in app_code dir) into assemblies, for aspx or ascx template, it still require dynamic compile at runtime. Here is a blog entry that also mentioned some information on this: #ASP.NET 2.0 - Web Site vs Web Application project http://blogs.microsoft.co.il/blogs/m...3/ASP.NET-2.0- _2D00_-Web-Site-vs-Web-Application-project.aspx Now, let's turn to the difference of the two compilation settings you have seen: 1. the compilation settings/options in "My project" settings, that one is used for the precompiling you performed via the build menu in visual studio, which will affect the generated assembly in bin dir(just like other non-asp.net projects such as winform, console...) 2. the compilation settings in web.config <compilation> element. This setting control the compilation options/behaviors of the ASP.NET runtime dynamic compilation (such as those aspx and ascx template which require being compiled at runtime when they're accessed first time). Here are some other articles mentioned some useful information related to the ASP.NET 2.0 dynamic compilation model and something that coupled with the visual studio IDE: #Understanding ASP.NET Dynamic Compilation http://msdn.microsoft.com/en-us/library/ms366723.aspx #Debug and Release Builds in ASP.NET 2.0 http://odetocode.com/blogs/scott/arc...1/15/2464.aspx Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxx. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- Quote: >From: =?Utf-8?B?TUNN?= <MCM@xxxxxx> Quote: >Subject: Re: web.config vs. My Project >Date: Sun, 15 Jun 2008 14:32:02 -0700 Quote: >Yes. It does not change web.config. > >"Scott M." wrote: > Quote: >> Have you tried changing Option Stict in the designer withOUT web.config Quote: Quote: >> in the editor and then opened web.config AFTER you've saved the designer >> dialog? >> >> >> "MCM" <MCM@xxxxxx> wrote in message >> news:25F9B76A-8B1E-4C40-80B3-DF3FAFBE065F@xxxxxx Quote: >> >I have litterally seen otherwise. I am looking at my code right now. I Quote: Quote: Quote: >> > option strict on in one, and it is NOT reflected in the other. >> > >> > "Scott M." wrote: >> > >> >> No, I'm sorry, but you are incorrect. >> >> >> >> Perhaps you misunderstood what I said. I didn't say that we should Quote: Quote: Quote: >> >> have to edit web.config directly. My comments were about your Quote: Quote: Quote: >> >> Option Strict, etc. settings. You should never have to go into >> >> web.config >> >> to turn Option Strict (and various other settings) on or off, that is >> >> what >> >> My Project dialogs are for and if you change it in one, it will be >> >> refelcted >> >> in the other. >> >> >> >> -Scott >> >> >> >> "MCM" <MCM@xxxxxx> wrote in message >> >> news:AD2A4EBA-F95F-4A53-AA21-17FD53A1E2EB@xxxxxx >> >> > That is incorrect. I agree that My Project is meant to be a method Quote: Quote: Quote: >> >> > editing >> >> > config files, but not web.config. Check for yourself. Perhaps it Quote: Quote: Quote: >> >> > app.config? That would make sense. >> >> > >> >> > "Scott M." wrote: >> >> > >> >> >> "My Project" is meant to be the way to set your preferences, Quote: Quote: Quote: >> >> >> than >> >> >> going into configuration files and editing them manually. You >> >> >> shouldn't >> >> >> ever have to go into web.config to set option strict because you Quote: Quote: Quote: >> >> >> do >> >> >> it >> >> >> in the My Project dialgogs. >> >> >> >> >> >> I don't think you can have a conflict because for things that are Quote: Quote: Quote: >> >> >> web.config and My Project, changing the setting in one will cause Quote: Quote: Quote: >> >> >> to >> >> >> change in the other. >> >> >> >> >> >> >> >> >> "MCM" <MCM@xxxxxx> wrote in message >> >> >> news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx >> >> >> > When creating a new VB Web Application Project with VS2008, Quote: Quote: Quote: >> >> >> > are >> >> >> > several >> >> >> > settings (compiler settings, option strict, etc) that appear Quote: Quote: Quote: >> >> >> > the >> >> >> > web.config file and "My Project". I'm wondering what takes >> >> >> > precedent, >> >> >> > what >> >> >> > the benefit of using one vs. the other is, and what happens if Quote: Quote: Quote: >> >> >> > conflict? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> |
My System Specs![]() |
| | #10 (permalink) |
| | Re: web.config vs. My Project Very helpful. Thank you for the explanation. "Steven Cheng [MSFT]" wrote: Quote: > Hi MCM, > > As for the compile options in "project properties" and web.config > <compilation> element, they are actually different. To clarify the > difference and how each of them will affect ASP.NET Web application > project's output, it may require us to first go through the difference > between "Web Application project" and the default "Web Site project" of > ASP.NET 2.0 Web application. > > In ASP.NET 2.0, it by default use dynamic compilation, which means it > doesn't generate precompiled assemblies in bin dir(like ASP.NET 1.1 /VS > 2003). And that's just what you'll get when you create ASP.NET 2.0 web > project via the "Web Site project" model. Later, the ASP.NET team add a > new project model "Web Application project", this provide an ASP.NET 1.1/VS > 2003 like model, at development time in IDE, you will be able to > build/compile the website and get precompiled assembly in "bin" dir. > However, the precompile only compile those codebehind classes or component > classes(such as those ones in app_code dir) into assemblies, for aspx or > ascx template, it still require dynamic compile at runtime. Here is a blog > entry that also mentioned some information on this: > > #ASP.NET 2.0 - Web Site vs Web Application project > http://blogs.microsoft.co.il/blogs/m...3/ASP.NET-2.0- > _2D00_-Web-Site-vs-Web-Application-project.aspx > > Now, let's turn to the difference of the two compilation settings you have > seen: > > 1. the compilation settings/options in "My project" settings, that one is > used for the precompiling you performed via the build menu in visual > studio, which will affect the generated assembly in bin dir(just like other > non-asp.net projects such as winform, console...) > > 2. the compilation settings in web.config <compilation> element. This > setting control the compilation options/behaviors of the ASP.NET runtime > dynamic compilation (such as those aspx and ascx template which require > being compiled at runtime when they're accessed first time). > > Here are some other articles mentioned some useful information related to > the ASP.NET 2.0 dynamic compilation model and something that coupled with > the visual studio IDE: > > #Understanding ASP.NET Dynamic Compilation > http://msdn.microsoft.com/en-us/library/ms366723.aspx > > #Debug and Release Builds in ASP.NET 2.0 > http://odetocode.com/blogs/scott/arc...1/15/2464.aspx > > Hope this helps. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@xxxxxx. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscripti...ult.aspx#notif > ications. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscripti...t/default.aspx. > ================================================== > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > > > -------------------- > Quote: > >From: =?Utf-8?B?TUNN?= <MCM@xxxxxx> Quote: > >Subject: Re: web.config vs. My Project > >Date: Sun, 15 Jun 2008 14:32:02 -0700 Quote: > >Yes. It does not change web.config. > > > >"Scott M." wrote: > > Quote: > >> Have you tried changing Option Stict in the designer withOUT web.config Quote: Quote: > >> in the editor and then opened web.config AFTER you've saved the designer > >> dialog? > >> > >> > >> "MCM" <MCM@xxxxxx> wrote in message > >> news:25F9B76A-8B1E-4C40-80B3-DF3FAFBE065F@xxxxxx > >> >I have litterally seen otherwise. I am looking at my code right now. I Quote: Quote: > >> > option strict on in one, and it is NOT reflected in the other. > >> > > >> > "Scott M." wrote: > >> > > >> >> No, I'm sorry, but you are incorrect. > >> >> > >> >> Perhaps you misunderstood what I said. I didn't say that we should Quote: Quote: > >> >> have to edit web.config directly. My comments were about your Quote: Quote: > >> >> Option Strict, etc. settings. You should never have to go into > >> >> web.config > >> >> to turn Option Strict (and various other settings) on or off, that is > >> >> what > >> >> My Project dialogs are for and if you change it in one, it will be > >> >> refelcted > >> >> in the other. > >> >> > >> >> -Scott > >> >> > >> >> "MCM" <MCM@xxxxxx> wrote in message > >> >> news:AD2A4EBA-F95F-4A53-AA21-17FD53A1E2EB@xxxxxx > >> >> > That is incorrect. I agree that My Project is meant to be a method Quote: Quote: > >> >> > editing > >> >> > config files, but not web.config. Check for yourself. Perhaps it Quote: Quote: > >> >> > app.config? That would make sense. > >> >> > > >> >> > "Scott M." wrote: > >> >> > > >> >> >> "My Project" is meant to be the way to set your preferences, Quote: Quote: > >> >> >> than > >> >> >> going into configuration files and editing them manually. You > >> >> >> shouldn't > >> >> >> ever have to go into web.config to set option strict because you Quote: Quote: > >> >> >> do > >> >> >> it > >> >> >> in the My Project dialgogs. > >> >> >> > >> >> >> I don't think you can have a conflict because for things that are Quote: Quote: > >> >> >> web.config and My Project, changing the setting in one will cause Quote: Quote: > >> >> >> to > >> >> >> change in the other. > >> >> >> > >> >> >> > >> >> >> "MCM" <MCM@xxxxxx> wrote in message > >> >> >> news:A93B7D92-5BC1-4622-9F02-C446FAD81331@xxxxxx > >> >> >> > When creating a new VB Web Application Project with VS2008, Quote: Quote: > >> >> >> > are > >> >> >> > several > >> >> >> > settings (compiler settings, option strict, etc) that appear Quote: Quote: > >> >> >> > the > >> >> >> > web.config file and "My Project". I'm wondering what takes > >> >> >> > precedent, > >> >> >> > what > >> >> >> > the benefit of using one vs. the other is, and what happens if Quote: Quote: > >> >> >> > conflict? > >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> >> > >> > >> > >> > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Extending app.config with addtional config | .NET General | |||
| In any project, Can't we refer classes directly, (without addingphysically in the project)? | .NET General | |||
| app.exe.config on XP but app.config on Vista x64? | Vista General | |||
| Microsoft Advances Its Project Management Technology and the Project Management Profession | Vista News | |||