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

The same web.config and global.asax files

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.