By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,723 Members | 850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,723 IT Pros & Developers. It's quick & easy.

web.config vs. My Project

P: n/a
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?
Jun 27 '08 #1
Share this Question
Share on Google+
10 Replies


P: n/a
"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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microsof t.com...
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?

Jun 27 '08 #2

P: n/a
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microsof t.com...
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?


Jun 27 '08 #3

P: n/a
Try

That is what we have to do too.

Cor

"MCM" <MC*@newsgroup.nospamschreef in bericht
news:A9**********************************@microsof t.com...
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?
Jun 27 '08 #4

P: n/a
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" <MC*@newsgroup.nospamwrote in message
news:AD**********************************@microsof t.com...
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microso ft.com...
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?



Jun 27 '08 #5

P: n/a
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:
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" <MC*@newsgroup.nospamwrote in message
news:AD**********************************@microsof t.com...
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microsof t.com...
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?


Jun 27 '08 #6

P: n/a
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" <MC*@newsgroup.nospamwrote in message
news:25**********************************@microsof t.com...
>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:
>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" <MC*@newsgroup.nospamwrote in message
news:AD**********************************@microso ft.com...
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microso ft.com...
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?



Jun 27 '08 #7

P: n/a
Yes. It does not change web.config.

"Scott M." wrote:
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" <MC*@newsgroup.nospamwrote in message
news:25**********************************@microsof t.com...
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:
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" <MC*@newsgroup.nospamwrote in message
news:AD**********************************@microsof t.com...
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microsof t.com...
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?



Jun 27 '08 #8

P: n/a
Hi MCM,

As for the compile options in "project properties" and web.config
<compilationelement, 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 <compilationelement. 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:
ms****@microsoft.com.

==================================================
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.

--------------------
>From: =?Utf-8?B?TUNN?= <MC*@newsgroup.nospam>
>Subject: Re: web.config vs. My Project
Date: Sun, 15 Jun 2008 14:32:02 -0700
>Yes. It does not change web.config.

"Scott M." wrote:
>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" <MC*@newsgroup.nospamwrote in message
news:25**********************************@microso ft.com...
>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:

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" <MC*@newsgroup.nospamwrote in message
news:AD**********************************@microso ft.com...
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microso ft.com...
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?



Jun 27 '08 #9

P: n/a
Very helpful. Thank you for the explanation.

"Steven Cheng [MSFT]" wrote:
Hi MCM,

As for the compile options in "project properties" and web.config
<compilationelement, 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 <compilationelement. 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:
ms****@microsoft.com.

==================================================
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.

--------------------
From: =?Utf-8?B?TUNN?= <MC*@newsgroup.nospam>
Subject: Re: web.config vs. My Project
Date: Sun, 15 Jun 2008 14:32:02 -0700
Yes. It does not change web.config.

"Scott M." wrote:
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" <MC*@newsgroup.nospamwrote in message
news:25**********************************@microsof t.com...
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:

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" <MC*@newsgroup.nospamwrote in message
news:AD**********************************@microsof t.com...
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" <MC*@newsgroup.nospamwrote in message
news:A9**********************************@microsof t.com...
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?



Jun 27 '08 #10

P: n/a
You're welcome.

If there is anything else we can help, welcome to post here.

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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: =?Utf-8?B?TUNN?= <MC*@newsgroup.nospam>
@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: web.config vs. My Project
Date: Mon, 16 Jun 2008 07:08:10 -0700
>
Very helpful. Thank you for the explanation.

"Steven Cheng [MSFT]" wrote:
>Hi MCM,

As for the compile options in "project properties" and web.config
<compilationelement, 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 <compilationelement. 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:

Jun 27 '08 #11

This discussion thread is closed

Replies have been disabled for this discussion.