473,763 Members | 6,401 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The same web.config and global.asax files

Hello,

I have to project: one ASN.NET project and another - Web Service in the same
solution. I want to use the same web.config and global.asax files. Does it
possible?

Thanks,

Ruslan
Nov 18 '05 #1
6 2369
Ruslan,

It is certainly possible, but I would recommend to use different folders
for your service and web application. That way, if you need to make a change
in the future that is not common to both (say, you want to use Forms
authentication for your ASP.Net project while having anonymous web service)
you can still do it.

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Ruslan" <ru*********@ho tmail.com> wrote in message
news:uZ******** ******@tk2msftn gp13.phx.gbl...
Hello,

I have to project: one ASN.NET project and another - Web Service in the same solution. I want to use the same web.config and global.asax files. Does it
possible?

Thanks,

Ruslan

Nov 18 '05 #2
Thank you,


I did that. I have 2 folders, for web service and web application. I put the
web.config file in the up folder for service and web applications. For
instance:

Web service ---- C:\project\web\ serviceFolder

Web application ---- C:\project\web\ applicationFold er

Web.config---- C:\project\web\ web.config

If I put this structure in the root, I mean, C:\Inetpub\wwwr oot, it works.
But if I put it in another place and I create virtual directory, it doesn't
work

Regards,

Ruslan

"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message
news:ew******** ******@tk2msftn gp13.phx.gbl...
Ruslan,

It is certainly possible, but I would recommend to use different folders for your service and web application. That way, if you need to make a change in the future that is not common to both (say, you want to use Forms
authentication for your ASP.Net project while having anonymous web service) you can still do it.

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Ruslan" <ru*********@ho tmail.com> wrote in message
news:uZ******** ******@tk2msftn gp13.phx.gbl...
Hello,

I have to project: one ASN.NET project and another - Web Service in the

same
solution. I want to use the same web.config and global.asax files. Does it possible?

Thanks,

Ruslan


Nov 18 '05 #3
Technically it shouldn't matter whether you put it under web root or not.
Framework just goes up one level to fine web.config file. The only thing to
watch out for is - your folder where web.config & global.asa are located has
to be "an application" in IIS terms. When you create your vroot make sure
you point to that folder. In the Internet Services Manager right-click that
virtual folder and make sure button "Create" is disabled (click it if it is
not).

When you say "it doesn't work" what symptoms are you referring to?

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Ruslan" <ru*********@ho tmail.com> wrote in message
news:um******** ******@TK2MSFTN GP10.phx.gbl...
Thank you,


I did that. I have 2 folders, for web service and web application. I put the web.config file in the up folder for service and web applications. For
instance:

Web service ---- C:\project\web\ serviceFolder

Web application ---- C:\project\web\ applicationFold er

Web.config---- C:\project\web\ web.config

If I put this structure in the root, I mean, C:\Inetpub\wwwr oot, it works.
But if I put it in another place and I create virtual directory, it doesn't work

Regards,

Ruslan

"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message
news:ew******** ******@tk2msftn gp13.phx.gbl...
Ruslan,

It is certainly possible, but I would recommend to use different folders
for your service and web application. That way, if you need to make a

change
in the future that is not common to both (say, you want to use Forms
authentication for your ASP.Net project while having anonymous web

service)
you can still do it.

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Ruslan" <ru*********@ho tmail.com> wrote in message
news:uZ******** ******@tk2msftn gp13.phx.gbl...
Hello,

I have to project: one ASN.NET project and another - Web Service in
the
same
solution. I want to use the same web.config and global.asax files.

Does it possible?

Thanks,

Ruslan



Nov 18 '05 #4
"It doesn't work" - the web.config & global.asa is not found.
"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message
news:#a******** ******@TK2MSFTN GP12.phx.gbl...
Technically it shouldn't matter whether you put it under web root or not.
Framework just goes up one level to fine web.config file. The only thing to watch out for is - your folder where web.config & global.asa are located has to be "an application" in IIS terms. When you create your vroot make sure
you point to that folder. In the Internet Services Manager right-click that virtual folder and make sure button "Create" is disabled (click it if it is not).

When you say "it doesn't work" what symptoms are you referring to?

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Ruslan" <ru*********@ho tmail.com> wrote in message
news:um******** ******@TK2MSFTN GP10.phx.gbl...
Thank you,


I did that. I have 2 folders, for web service and web application. I put

the
web.config file in the up folder for service and web applications. For
instance:

Web service ---- C:\project\web\ serviceFolder

Web application ---- C:\project\web\ applicationFold er

Web.config---- C:\project\web\ web.config

If I put this structure in the root, I mean, C:\Inetpub\wwwr oot, it works.
But if I put it in another place and I create virtual directory, it

doesn't
work

Regards,

Ruslan

"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message news:ew******** ******@tk2msftn gp13.phx.gbl...
Ruslan,

It is certainly possible, but I would recommend to use different

folders
for your service and web application. That way, if you need to make a

change
in the future that is not common to both (say, you want to use Forms
authentication for your ASP.Net project while having anonymous web

service)
you can still do it.

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Ruslan" <ru*********@ho tmail.com> wrote in message
news:uZ******** ******@tk2msftn gp13.phx.gbl...
> Hello,
>
>
>
> I have to project: one ASN.NET project and another - Web Service in

the same
> solution. I want to use the same web.config and global.asax files.

Does
it
> possible?
>
>
>
> Thanks,
>
>
>
> Ruslan
>
>



Nov 18 '05 #5
What happens if you copy web.config into your serviceFolder and
applicationFold er. Does it start working? And also, what is the
configuration of your vroot? Does it point to C:\project\web (in other words
do you type http://<server>/<vrootname>/web/applicationFold er to get to your
application pages) and configured to be an application?

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Ruslan" <ru*********@ho tmail.com> wrote in message
news:ua******** ********@TK2MSF TNGP09.phx.gbl. ..
"It doesn't work" - the web.config & global.asa is not found.
"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message
news:#a******** ******@TK2MSFTN GP12.phx.gbl...
Technically it shouldn't matter whether you put it under web root or not.
Framework just goes up one level to fine web.config file. The only thing

to
watch out for is - your folder where web.config & global.asa are located

has
to be "an application" in IIS terms. When you create your vroot make sure you point to that folder. In the Internet Services Manager right-click

that
virtual folder and make sure button "Create" is disabled (click it if it

is
not).

When you say "it doesn't work" what symptoms are you referring to?

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Ruslan" <ru*********@ho tmail.com> wrote in message
news:um******** ******@TK2MSFTN GP10.phx.gbl...
Thank you,


I did that. I have 2 folders, for web service and web application. I put
the
web.config file in the up folder for service and web applications. For
instance:

Web service ---- C:\project\web\ serviceFolder

Web application ---- C:\project\web\ applicationFold er

Web.config---- C:\project\web\ web.config

If I put this structure in the root, I mean, C:\Inetpub\wwwr oot, it works. But if I put it in another place and I create virtual directory, it

doesn't
work

Regards,

Ruslan

"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message news:ew******** ******@tk2msftn gp13.phx.gbl...
> Ruslan,
>
> It is certainly possible, but I would recommend to use different
folders
> for your service and web application. That way, if you need to make

a change
> in the future that is not common to both (say, you want to use Forms
> authentication for your ASP.Net project while having anonymous web
service)
> you can still do it.
>
> --
> Vitaly.
> -------
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm.
>
>
> "Ruslan" <ru*********@ho tmail.com> wrote in message
> news:uZ******** ******@tk2msftn gp13.phx.gbl...
> > Hello,
> >
> >
> >
> > I have to project: one ASN.NET project and another - Web Service

in the
> same
> > solution. I want to use the same web.config and global.asax files.

Does
it
> > possible?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Ruslan
> >
> >
>
>



Nov 18 '05 #6
If I copy web.config in serviceFolder and applicationFold er it works.

The configuration of vroot:
http://localhost/web-serv-virt-dir/web-service.asmx -- for the web service,
and point to: C:\project\web\ serviceFolder
http://localhost/web-app-virt-dir/web-app.asmx -- for the application, and
point to C:\project\web\ applicationFold er

"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message
news:#g******** ******@TK2MSFTN GP09.phx.gbl...
What happens if you copy web.config into your serviceFolder and
applicationFold er. Does it start working? And also, what is the
configuration of your vroot? Does it point to C:\project\web (in other words do you type http://<server>/<vrootname>/web/applicationFold er to get to your application pages) and configured to be an application?

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Ruslan" <ru*********@ho tmail.com> wrote in message
news:ua******** ********@TK2MSF TNGP09.phx.gbl. ..
"It doesn't work" - the web.config & global.asa is not found.
"Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in message
news:#a******** ******@TK2MSFTN GP12.phx.gbl...
Technically it shouldn't matter whether you put it under web root or not. Framework just goes up one level to fine web.config file. The only thing to
watch out for is - your folder where web.config & global.asa are
located
has
to be "an application" in IIS terms. When you create your vroot make sure you point to that folder. In the Internet Services Manager right-click that
virtual folder and make sure button "Create" is disabled (click it if
it is
not).

When you say "it doesn't work" what symptoms are you referring to?

--
Vitaly.
-------
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Ruslan" <ru*********@ho tmail.com> wrote in message
news:um******** ******@TK2MSFTN GP10.phx.gbl...
> Thank you,
>
>
>
>
> I did that. I have 2 folders, for web service and web application. I

put the
> web.config file in the up folder for service and web applications.
For > instance:
>
>
>
> Web service ---- C:\project\web\ serviceFolder
>
> Web application ---- C:\project\web\ applicationFold er
>
> Web.config---- C:\project\web\ web.config
>
>
>
> If I put this structure in the root, I mean, C:\Inetpub\wwwr oot, it

works.
> But if I put it in another place and I create virtual directory, it
doesn't
> work
>
>
>
> Regards,
>
> Ruslan
>
>
>
> "Vitaly Filimonov [MSFT]" <vi*****@online .microsoft.com> wrote in

message
> news:ew******** ******@tk2msftn gp13.phx.gbl...
> > Ruslan,
> >
> > It is certainly possible, but I would recommend to use different > folders
> > for your service and web application. That way, if you need to make a > change
> > in the future that is not common to both (say, you want to use
Forms > > authentication for your ASP.Net project while having anonymous web
> service)
> > you can still do it.
> >
> > --
> > Vitaly.
> > -------
> > This posting is provided "AS IS" with no warranties, and confers no > rights.
> > Use of included script samples are subject to the terms specified at > > http://www.microsoft.com/info/cpyright.htm.
> >
> >
> > "Ruslan" <ru*********@ho tmail.com> wrote in message
> > news:uZ******** ******@tk2msftn gp13.phx.gbl...
> > > Hello,
> > >
> > >
> > >
> > > I have to project: one ASN.NET project and another - Web Service

in the
> > same
> > > solution. I want to use the same web.config and global.asax files. Does
> it
> > > possible?
> > >
> > >
> > >
> > > Thanks,
> > >
> > >
> > >
> > > Ruslan
> > >
> > >
> >
> >
>
>



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1977
by: Mark | last post by:
I have two projects - they both need to use the same web.config file, the same global.asax file, and share a common "look and feel" via several user controls. Is there an easy way for two projects to share these resources in VS.NET so we don't have to worry about synchronization issues ASIDE from combining the two projects into one? Thanks in advance! Mark
0
1501
by: Roy Chastain | last post by:
I have a simple page or two and a simple global.asax file that loads some configuration from the web.config file. I developed this on a Windows XP box with framework version 1.1 installed. I run it on a 2003 box with both version 1.0 and 1.1 installed. This appears to work. When move the page and code to my clients hosting service (Earthlink) which only supports version 1.0 of the framework, I get the error below. I know that my...
3
6128
by: hansiman | last post by:
I use Application_Start in global.asax to set some physical folder paths ie.: Application("pdf") = "c:\www\<site>\pdf\" global.asax uses code behind. When I move the project from the dev to the production server the global.asax code behind is compiled into the project.dll (i guess). This renders the physical paths unusable (naturally). Coming from
22
3796
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to manipulate them. It starts > and ends with <script></script> tags. > > Yours looks like a compiled version of it.
2
3711
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How do I ensure that changes made to the "Global.asax.vb" file are immediately reflected in the "Global.asax" file? After I change to the "Global.asax.vb" file, the "Global.asax" file date modified does not change and I do not see the updated values...
11
8376
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the generated code on a W2K3 server the application_start and any other event on the global.asax file won't fire. I added tracing and logging to make sure and I can see the code is just not execution. When running the same exact (deployed etc.) code on...
6
4380
by: Bob | last post by:
Hi, i was wondering whether i would use global.asax or web.config for the connectionstring to the database. I put this in global.asax. Sub Application_Start Application("Connect") = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\mydb.mdb;" End Sub
1
1879
by: teo | last post by:
I put some variables in a web.config file I have a global.asax file that needs to use one of those variables How can global.asax read that value? If I have more than one web.config file, how can the global.asax detect the right web.config file ?
16
5045
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="<Namespace>." %> I've done a lot of things I've found on the web to no avial, but here are some unique things about what is happening to me.
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.