473,379 Members | 1,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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 2334
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*********@hotmail.com> wrote in message
news:uZ**************@tk2msftngp13.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\applicationFolder

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

If I put this structure in the root, I mean, C:\Inetpub\wwwroot, 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**************@tk2msftngp13.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*********@hotmail.com> wrote in message
news:uZ**************@tk2msftngp13.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*********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP10.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\applicationFolder

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

If I put this structure in the root, I mean, C:\Inetpub\wwwroot, 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**************@tk2msftngp13.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*********@hotmail.com> wrote in message
news:uZ**************@tk2msftngp13.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**************@TK2MSFTNGP12.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*********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP10.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\applicationFolder

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

If I put this structure in the root, I mean, C:\Inetpub\wwwroot, 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**************@tk2msftngp13.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*********@hotmail.com> wrote in message
news:uZ**************@tk2msftngp13.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
applicationFolder. 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/applicationFolder 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*********@hotmail.com> wrote in message
news:ua****************@TK2MSFTNGP09.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**************@TK2MSFTNGP12.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*********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP10.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\applicationFolder

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

If I put this structure in the root, I mean, C:\Inetpub\wwwroot, 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**************@tk2msftngp13.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*********@hotmail.com> wrote in message
> news:uZ**************@tk2msftngp13.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 applicationFolder 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\applicationFolder

"Vitaly Filimonov [MSFT]" <vi*****@online.microsoft.com> wrote in message
news:#g**************@TK2MSFTNGP09.phx.gbl...
What happens if you copy web.config into your serviceFolder and
applicationFolder. 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/applicationFolder 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*********@hotmail.com> wrote in message
news:ua****************@TK2MSFTNGP09.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**************@TK2MSFTNGP12.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*********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP10.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\applicationFolder
>
> Web.config---- C:\project\web\web.config
>
>
>
> If I put this structure in the root, I mean, C:\Inetpub\wwwroot, 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**************@tk2msftngp13.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*********@hotmail.com> wrote in message
> > news:uZ**************@tk2msftngp13.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
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...
0
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...
3
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...
22
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...
2
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...
11
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...
6
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") =...
1
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 ...
16
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: <%@...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.