Professional Web Applications Themes

The same web.config and global.asax files - ASP.NET Web Services

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

  1. #1

    Default 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


    Ruslan Guest

  2. #2

    Default Re: The same web.config and global.asax files

    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
    [url]http://www.microsoft.com/info/cpyright.htm[/url].


    "Ruslan" <ruslan_albuhotmail.com> wrote in message
    news:uZQ$Q6mvDHA.1788tk2msftngp13.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
    >
    >

    Vitaly Filimonov [MSFT] Guest

  3. #3

    Default Re: The same web.config and global.asax files

    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]" <vitalyfonline.microsoft.com> wrote in message
    news:ewpACs2vDHA.2408tk2msftngp13.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
    > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    >
    >
    > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > news:uZQ$Q6mvDHA.1788tk2msftngp13.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
    > >
    > >
    >
    >

    Ruslan Guest

  4. #4

    Default Re: The same web.config and global.asax files

    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
    [url]http://www.microsoft.com/info/cpyright.htm[/url].

    "Ruslan" <ruslan_albuhotmail.com> wrote in message
    news:umsqcY9vDHA.2080TK2MSFTNGP10.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]" <vitalyfonline.microsoft.com> wrote in message
    > news:ewpACs2vDHA.2408tk2msftngp13.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
    > > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    > >
    > >
    > > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > > news:uZQ$Q6mvDHA.1788tk2msftngp13.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
    > > >
    > > >
    > >
    > >
    >
    >

    Vitaly Filimonov [MSFT] Guest

  5. #5

    Default Re: The same web.config and global.asax files

    "It doesn't work" - the web.config & global.asa is not found.


    "Vitaly Filimonov [MSFT]" <vitalyfonline.microsoft.com> wrote in message
    news:#aeS4cAwDHA.2492TK2MSFTNGP12.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
    > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    >
    > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > news:umsqcY9vDHA.2080TK2MSFTNGP10.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]" <vitalyfonline.microsoft.com> wrote in
    message
    > > news:ewpACs2vDHA.2408tk2msftngp13.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
    > > > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    > > >
    > > >
    > > > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > > > news:uZQ$Q6mvDHA.1788tk2msftngp13.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
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Ruslan Guest

  6. #6

    Default Re: The same web.config and global.asax files

    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
    [url]http://www.microsoft.com/info/cpyright.htm[/url].

    "Ruslan" <ruslan_albuhotmail.com> wrote in message
    news:ua9%23BHIwDHA.2540TK2MSFTNGP09.phx.gbl...
    > "It doesn't work" - the web.config & global.asa is not found.
    >
    >
    > "Vitaly Filimonov [MSFT]" <vitalyfonline.microsoft.com> wrote in message
    > news:#aeS4cAwDHA.2492TK2MSFTNGP12.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
    > > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    > >
    > > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > > news:umsqcY9vDHA.2080TK2MSFTNGP10.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]" <vitalyfonline.microsoft.com> wrote in
    > message
    > > > news:ewpACs2vDHA.2408tk2msftngp13.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
    > > > > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    > > > >
    > > > >
    > > > > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > > > > news:uZQ$Q6mvDHA.1788tk2msftngp13.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
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Vitaly Filimonov [MSFT] Guest

  7. #7

    Default Re: The same web.config and global.asax files

    If I copy web.config in serviceFolder and applicationFolder it works.

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



    "Vitaly Filimonov [MSFT]" <vitalyfonline.microsoft.com> wrote in message
    news:#gtt$fOwDHA.2360TK2MSFTNGP09.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
    > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    >
    > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > news:ua9%23BHIwDHA.2540TK2MSFTNGP09.phx.gbl...
    > > "It doesn't work" - the web.config & global.asa is not found.
    > >
    > >
    > > "Vitaly Filimonov [MSFT]" <vitalyfonline.microsoft.com> wrote in
    message
    > > news:#aeS4cAwDHA.2492TK2MSFTNGP12.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
    > > > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    > > >
    > > > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > > > news:umsqcY9vDHA.2080TK2MSFTNGP10.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]" <vitalyfonline.microsoft.com> wrote in
    > > message
    > > > > news:ewpACs2vDHA.2408tk2msftngp13.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
    > > > > > [url]http://www.microsoft.com/info/cpyright.htm[/url].
    > > > > >
    > > > > >
    > > > > > "Ruslan" <ruslan_albuhotmail.com> wrote in message
    > > > > > news:uZQ$Q6mvDHA.1788tk2msftngp13.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
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Ruslan Guest

Similar Threads

  1. Session_Start in Global.asax
    By DesignerX in forum ASP.NET General
    Replies: 2
    Last Post: November 17th, 09:10 AM
  2. global.asax
    By Vanessa Berni in forum ASP.NET
    Replies: 12
    Last Post: March 26th, 06:06 PM
  3. Replies: 1
    Last Post: July 29th, 03:12 AM
  4. What is Global.asax?
    By Chuck Haeberle in forum ASP.NET General
    Replies: 0
    Last Post: July 24th, 05:16 PM
  5. global.asax classname
    By noname in forum ASP.NET General
    Replies: 1
    Last Post: July 16th, 07:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139