Virtual Directory not working
Virtual Directory not working
am 23.08.2007 03:03:36 von tshad
I have a site www.stf.com and a site www.stfstage.com (where I do all my
testing).
The problem is that www.stfstage.com is only internal and I need to get
access from the outside (without creating a new domain).
I tried to create a Virtual directory inside my stf site so that I would
access it like: www.stf.com/stage/.
I run as www.stfstage.com fine and have for a long time.
But if I try to do it as www.stf.com/stage/ I get the error:
************************************
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: The module 'ScollKeeperModule' is already in the
application and cannot be added again
Source Error:
Line 33:
Line 34:
Line 35:
type="NFission.WebControls.ScrollKeeperModule,NFission.WebCo ntrols.ScrollKeeper"
Line 36: name="ScollKeeperModule" />
Line 37:
Source File: C:\Inetpub\wwwroot\StfStage\web.config Line: 35
************************************
type="NFission.WebControls.ScrollKeeperConfigHandler,NFissio n.WebControls.ScrollKeeper"/>
mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:42424"
cookieless="false"
timeout="400"
/>
loginUrl="/applicant/ee_logon.aspx"
timeout="400"
protection="All"
path="/" />
type="NFission.WebControls.ScrollKeeperModule,NFission.WebCo ntrols.ScrollKeeper"
name="ScollKeeperModule" />
type="MetaBuilders.WebControls.DialogImageHandler,
MetaBuilders.WebControls.DialogWindow" />
path="FtbWebResource.axd"
type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha" />
************************************************************ ************************
Scrollkeeper is apparently causing the problem but only as a Virtual
directory. It works fine when I access it as www.stfstage.com.
If I take out the ScrollKeeper sections it seems to have a problem with
virtual paths and gets an error:
************************************************************ ***************************
The virtual path '/skins/mth/MainPage.ascx' maps to another application,
which is not allowed.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The virtual path
'/skins/mth/MainPage.ascx' maps to another application, which is not
allowed.
Source Error:
Line 27: navigation = "NavigateTop" & ".ascx"
Line 28: end if
Line 29: pageControl = LoadControl(thePage)
Line 30: thePlaceHolder.Controls.Add(pageControl)
Line 31: contentControl =
CType(thePlaceHolder.FindControl("_ctl0:Navigation"),Control )
Source File: C:\Inetpub\wwwroot\StfStage\jobSeeker\displaycompanyJobs.asp x
Line: 29
************************************************************ ***************************
My code that is causing the problem is:
tePage = "/skins/" & session("CompanyInitials") & "/" & "MainPage" &
".ascx"
pageControl = LoadControl(thePage)
How can I make this work in my scenario - or can I?
Thanks,
Tom
Re: Virtual Directory not working
am 23.08.2007 06:27:54 von Kristofer Gafvert
Either change the code so that you can run it in a virtual directory
(inside the application itself), or use a separate website with a domain
name you can access from the outside.
Why cannot you create a new domain? It is so cheap to buy a domain name
that it is the easiest solution.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
tshad wrote:
>I have a site www.stf.com and a site www.stfstage.com (where I do all my
>testing).
>
>The problem is that www.stfstage.com is only internal and I need to get
>access from the outside (without creating a new domain).
>
>I tried to create a Virtual directory inside my stf site so that I would
>access it like: www.stf.com/stage/.
>
>I run as www.stfstage.com fine and have for a long time.
>
>But if I try to do it as www.stf.com/stage/ I get the error:
>
>************************************
>Description: An error occurred during the processing of a configuration
>file required to service this request. Please review the specific error
>details below and modify your configuration file appropriately.
>
>Parser Error Message: The module 'ScollKeeperModule' is already in the
>application and cannot be added again
>
>Source Error:
>
>Line 33:
>Line 34:
>Line 35:
>type="NFission.WebControls.ScrollKeeperModule,NFission.WebC ontrols.ScrollKeeper"
>Line 36: name="ScollKeeperModule" />
>Line 37:
>
>
>Source File: C:\Inetpub\wwwroot\StfStage\web.config Line: 35
>************************************
>
>
>
>type="NFission.WebControls.ScrollKeeperConfigHandler,NFissi on.WebControls.ScrollKeeper"/>
>
>
>
>
>
>
>
>
>
>
>
>
> mode="StateServer"
> stateConnectionString="tcpip=127.0.0.1:42424"
> cookieless="false"
> timeout="400"
> />
>
>
> loginUrl="/applicant/ee_logon.aspx"
> timeout="400"
> protection="All"
> path="/" />
>
>
>
>
>
>
>
>
>
> name="ScollKeeperModule" />
>
>
>
> type="MetaBuilders.WebControls.DialogImageHandler,
> MetaBuilders.WebControls.DialogWindow" />
>
> path="FtbWebResource.axd"
> type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
>
>
>
>
>*********************************************************** *************************
>
>Scrollkeeper is apparently causing the problem but only as a Virtual
>directory. It works fine when I access it as www.stfstage.com.
>
>If I take out the ScrollKeeper sections it seems to have a problem with
>virtual paths and gets an error:
>*********************************************************** ****************************
>The virtual path '/skins/mth/MainPage.ascx' maps to another application,
>which is not allowed.
>Description: An unhandled exception occurred during the execution of the
>current web request. Please review the stack trace for more information
>about the error and where it originated in the code.
>
>Exception Details: System.Web.HttpException: The virtual path
>'/skins/mth/MainPage.ascx' maps to another application, which is not
>allowed.
>
>Source Error:
>
>Line 27: navigation = "NavigateTop" & ".ascx"
>Line 28: end if
>Line 29: pageControl = LoadControl(thePage)
>Line 30: thePlaceHolder.Controls.Add(pageControl)
>Line 31: contentControl =
>CType(thePlaceHolder.FindControl("_ctl0:Navigation"),Contro l)
>
>Source File: C:\Inetpub\wwwroot\StfStage\jobSeeker\displaycompanyJobs.asp x
>Line: 29
>*********************************************************** ****************************
>
>My code that is causing the problem is:
>
> tePage = "/skins/" & session("CompanyInitials") & "/" & "MainPage" & ".ascx"
> pageControl = LoadControl(thePage)
>
>How can I make this work in my scenario - or can I?
>
>Thanks,
>
>Tom
Re: Virtual Directory not working
am 23.08.2007 19:22:27 von tshad
"Kristofer Gafvert" wrote in message
news:xn0faa9a0diy500009@news.microsoft.com...
> Either change the code so that you can run it in a virtual directory
> (inside the application itself), or use a separate website with a domain
> name you can access from the outside.
>
> Why cannot you create a new domain? It is so cheap to buy a domain name
> that it is the easiest solution.
I agree and I suggested this to my boss and will probably do this.
But I still want to find out why this isn't working. It works on another of
our sites but that site doesn't have ScrollKeeper on it. And I did find
that I need to add a tilde to all my paths (~/skins/file.aspx instead of
/skins/file.aspx). Never understood why the tilde was needed, and doesn't
seem to do anything different in a normal website, but in the case of a
virtual directory it does seem to make a difference.
Thanks,
Tom
>
> --
> Regards,
> Kristofer Gafvert
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> tshad wrote:
>
>>I have a site www.stf.com and a site www.stfstage.com (where I do all my
>>testing).
>>
>>The problem is that www.stfstage.com is only internal and I need to get
>>access from the outside (without creating a new domain).
>>
>>I tried to create a Virtual directory inside my stf site so that I would
>>access it like: www.stf.com/stage/.
>>
>>I run as www.stfstage.com fine and have for a long time.
>>
>>But if I try to do it as www.stf.com/stage/ I get the error:
>>
>>************************************
>>Description: An error occurred during the processing of a configuration
>>file required to service this request. Please review the specific error
>>details below and modify your configuration file appropriately.
>>
>>Parser Error Message: The module 'ScollKeeperModule' is already in the
>>application and cannot be added again
>>
>>Source Error:
>>
>>Line 33:
>>Line 34:
>>Line 35:
>>type="NFission.WebControls.ScrollKeeperModule,NFission.Web Controls.ScrollKeeper"
>>Line 36: name="ScollKeeperModule" />
>>Line 37:
>>
>>
>>Source File: C:\Inetpub\wwwroot\StfStage\web.config Line: 35
>>************************************
>>
>>
>>
>>type="NFission.WebControls.ScrollKeeperConfigHandler,NFiss ion.WebControls.ScrollKeeper"/>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> mode="StateServer"
>> stateConnectionString="tcpip=127.0.0.1:42424"
>> cookieless="false"
>> timeout="400"
>> />
>>
>>
>> loginUrl="/applicant/ee_logon.aspx"
>> timeout="400"
>> protection="All"
>> path="/" />
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> type="NFission.WebControls.ScrollKeeperModule,NFission.WebCo ntrols.ScrollKeeper"
>> name="ScollKeeperModule" />
>>
>>
>>
>> type="MetaBuilders.WebControls.DialogImageHandler,
>> MetaBuilders.WebControls.DialogWindow" />
>>
>> path="FtbWebResource.axd"
>> type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
>>
>> type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha" />
>>
>>
>>
>>********************************************************** **************************
>>
>>Scrollkeeper is apparently causing the problem but only as a Virtual
>>directory. It works fine when I access it as www.stfstage.com.
>>
>>If I take out the ScrollKeeper sections it seems to have a problem with
>>virtual paths and gets an error:
>>********************************************************** *****************************
>>The virtual path '/skins/mth/MainPage.ascx' maps to another application,
>>which is not allowed.
>>Description: An unhandled exception occurred during the execution of the
>>current web request. Please review the stack trace for more information
>>about the error and where it originated in the code.
>>
>>Exception Details: System.Web.HttpException: The virtual path
>>'/skins/mth/MainPage.ascx' maps to another application, which is not
>>allowed.
>>
>>Source Error:
>>
>>Line 27: navigation = "NavigateTop" & ".ascx"
>>Line 28: end if
>>Line 29: pageControl = LoadControl(thePage)
>>Line 30: thePlaceHolder.Controls.Add(pageControl)
>>Line 31: contentControl =
>>CType(thePlaceHolder.FindControl("_ctl0:Navigation"),Contr ol)
>>
>>Source File: C:\Inetpub\wwwroot\StfStage\jobSeeker\displaycompanyJobs.asp x
>>Line: 29
>>********************************************************** *****************************
>>
>>My code that is causing the problem is:
>>
>> tePage = "/skins/" & session("CompanyInitials") & "/" & "MainPage" &
>> ".ascx"
>> pageControl = LoadControl(thePage)
>>
>>How can I make this work in my scenario - or can I?
>>
>>Thanks,
>>
>>Tom
Re: Virtual Directory not working
am 23.08.2007 19:31:44 von Kristofer Gafvert
Let's say you place the application in the virtual directory
/application/. When you use /skins/file.aspx as path, it starts from the
root of the website, so the full path is /skins/file.aspx. The tilde is
used to refer to the application root (instead of the website root), so
the path will be /application/skins/file.aspx.
I would recommend you to never use absolute paths, but instead either use
relative paths or tilde (in an ASP.NET application).
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
tshad wrote:
>"Kristofer Gafvert" wrote in message
>news:xn0faa9a0diy500009@news.microsoft.com...
>>Either change the code so that you can run it in a virtual directory
>>(inside the application itself), or use a separate website with a domain
>>name you can access from the outside.
>>
>>Why cannot you create a new domain? It is so cheap to buy a domain name
>>that it is the easiest solution.
>
>I agree and I suggested this to my boss and will probably do this.
>
>But I still want to find out why this isn't working. It works on another
>of our sites but that site doesn't have ScrollKeeper on it. And I did
>find that I need to add a tilde to all my paths (~/skins/file.aspx instead
>of /skins/file.aspx). Never understood why the tilde was needed, and
>doesn't seem to do anything different in a normal website, but in the case
>of a virtual directory it does seem to make a difference.
>
>Thanks,
>
>Tom
>>
>>-- Regards,
>>Kristofer Gafvert
>>http://www.gafvert.info/iis/ - IIS Related Info
>>
>>
>>tshad wrote:
>>
>>>I have a site www.stf.com and a site www.stfstage.com (where I do all my
>>>testing).
>>>
>>>The problem is that www.stfstage.com is only internal and I need to get
>>>access from the outside (without creating a new domain).
>>>
>>>I tried to create a Virtual directory inside my stf site so that I would
>>>access it like: www.stf.com/stage/.
>>>
>>>I run as www.stfstage.com fine and have for a long time.
>>>
>>>But if I try to do it as www.stf.com/stage/ I get the error:
>>>
>>>************************************
>>>Description: An error occurred during the processing of a configuration
>>>file required to service this request. Please review the specific error
>>>details below and modify your configuration file appropriately.
>>>
>>>Parser Error Message: The module 'ScollKeeperModule' is already in the
>>>application and cannot be added again
>>>
>>>Source Error:
>>>
>>>Line 33:
>>>Line 34:
>>>Line 35:
>>>type="NFission.WebControls.ScrollKeeperModule,NFission.We bControls.ScrollKeeper"
>>>Line 36: name="ScollKeeperModule" />
>>>Line 37:
>>>
>>>
>>>Source File: C:\Inetpub\wwwroot\StfStage\web.config Line: 35
>>>************************************
>>>
>>>
>>>
>>>type="NFission.WebControls.ScrollKeeperConfigHandler,NFis sion.WebControls.ScrollKeeper"/>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> mode="StateServer"
>>> stateConnectionString="tcpip=127.0.0.1:42424"
>>> cookieless="false"
>>> timeout="400"
>>> />
>>>
>>>
>>> loginUrl="/applicant/ee_logon.aspx"
>>> timeout="400"
>>> protection="All"
>>> path="/" />
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> name="ScollKeeperModule" />
>>>
>>>
>>>
>>> type="MetaBuilders.WebControls.DialogImageHandler,
>>> MetaBuilders.WebControls.DialogWindow" />
>>>
>>> path="FtbWebResource.axd"
>>> type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
>>>
>>>type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha" />
>>>
>>>
>>>
>>>********************************************************* ***************************
>>>
>>>Scrollkeeper is apparently causing the problem but only as a Virtual
>>>directory. It works fine when I access it as www.stfstage.com.
>>>
>>>If I take out the ScrollKeeper sections it seems to have a problem with
>>>virtual paths and gets an error:
>>>********************************************************* ******************************
>>>The virtual path '/skins/mth/MainPage.ascx' maps to another application,
>>>which is not allowed.
>>>Description: An unhandled exception occurred during the execution of the
>>>current web request. Please review the stack trace for more information
>>>about the error and where it originated in the code.
>>>
>>>Exception Details: System.Web.HttpException: The virtual path
>>>'/skins/mth/MainPage.ascx' maps to another application, which is not
>>>allowed.
>>>
>>>Source Error:
>>>
>>>Line 27: navigation = "NavigateTop" & ".ascx"
>>>Line 28: end if
>>>Line 29: pageControl = LoadControl(thePage)
>>>Line 30: thePlaceHolder.Controls.Add(pageControl)
>>>Line 31: contentControl =
>>>CType(thePlaceHolder.FindControl("_ctl0:Navigation"),Cont rol)
>>>
>>>Source File: C:\Inetpub\wwwroot\StfStage\jobSeeker\displaycompanyJobs.asp x
>>>Line: 29
>>>********************************************************* ******************************
>>>
>>>My code that is causing the problem is:
>>>
>>>tePage = "/skins/" & session("CompanyInitials") & "/" & "MainPage" &
>>>".ascx"
>>>pageControl = LoadControl(thePage)
>>>
>>>How can I make this work in my scenario - or can I?
>>>
>>>Thanks,
>>>
>>>Tom
Re: Virtual Directory not working
am 23.08.2007 21:33:15 von tshad
"Kristofer Gafvert" wrote in message
news:xn0faatwyeay2w000a@news.microsoft.com...
> Let's say you place the application in the virtual directory
> /application/. When you use /skins/file.aspx as path, it starts from the
> root of the website, so the full path is /skins/file.aspx. The tilde is
> used to refer to the application root (instead of the website root), so
> the path will be /application/skins/file.aspx.
>
> I would recommend you to never use absolute paths, but instead either use
> relative paths or tilde (in an ASP.NET application).
I agree (now).
But I did find that this didn't work in my code when I use the virtual
directory but did when calling the website (www.stf.com/stage/)
This does work:
The other thing that doesn't seem to work is:
And this doesn't work - I assume as it only works on tags with
"runat=server":
The other thing that doesn't seem to work is:
Thanks,
Tom
>
> --
> Regards,
> Kristofer Gafvert
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> tshad wrote:
>
>>"Kristofer Gafvert" wrote in message
>>news:xn0faa9a0diy500009@news.microsoft.com...
>>>Either change the code so that you can run it in a virtual directory
>>>(inside the application itself), or use a separate website with a domain
>>>name you can access from the outside.
>>>
>>>Why cannot you create a new domain? It is so cheap to buy a domain name
>>>that it is the easiest solution.
>>
>>I agree and I suggested this to my boss and will probably do this.
>>
>>But I still want to find out why this isn't working. It works on another
>>of our sites but that site doesn't have ScrollKeeper on it. And I did
>>find that I need to add a tilde to all my paths (~/skins/file.aspx instead
>>of /skins/file.aspx). Never understood why the tilde was needed, and
>>doesn't seem to do anything different in a normal website, but in the case
>>of a virtual directory it does seem to make a difference.
>>
>>Thanks,
>>
>>Tom
>>>
>>>-- Regards,
>>>Kristofer Gafvert
>>>http://www.gafvert.info/iis/ - IIS Related Info
>>>
>>>
>>>tshad wrote:
>>>
>>>>I have a site www.stf.com and a site www.stfstage.com (where I do all my
>>>>testing).
>>>>
>>>>The problem is that www.stfstage.com is only internal and I need to get
>>>>access from the outside (without creating a new domain).
>>>>
>>>>I tried to create a Virtual directory inside my stf site so that I would
>>>>access it like: www.stf.com/stage/.
>>>>
>>>>I run as www.stfstage.com fine and have for a long time.
>>>>
>>>>But if I try to do it as www.stf.com/stage/ I get the error:
>>>>
>>>>************************************
>>>>Description: An error occurred during the processing of a configuration
>>>>file required to service this request. Please review the specific error
>>>>details below and modify your configuration file appropriately.
>>>>
>>>>Parser Error Message: The module 'ScollKeeperModule' is already in the
>>>>application and cannot be added again
>>>>
>>>>Source Error:
>>>>
>>>>Line 33:
>>>>Line 34:
>>>>Line 35:
>>>>type="NFission.WebControls.ScrollKeeperModule,NFission.W ebControls.ScrollKeeper"
>>>>Line 36: name="ScollKeeperModule" />
>>>>Line 37:
>>>>
>>>>
>>>>Source File: C:\Inetpub\wwwroot\StfStage\web.config Line: 35
>>>>************************************
>>>>
>>>>
>>>>
>>>>type="NFission.WebControls.ScrollKeeperConfigHandler,NFi ssion.WebControls.ScrollKeeper"/>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> mode="StateServer"
>>>> stateConnectionString="tcpip=127.0.0.1:42424"
>>>> cookieless="false"
>>>> timeout="400"
>>>> />
>>>>
>>>>
>>>> loginUrl="/applicant/ee_logon.aspx"
>>>> timeout="400"
>>>> protection="All"
>>>> path="/" />
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> type="NFission.WebControls.ScrollKeeperModule,NFission.WebCo ntrols.ScrollKeeper"
>>>> name="ScollKeeperModule" />
>>>>
>>>>
>>>>
>>>> type="MetaBuilders.WebControls.DialogImageHandler,
>>>> MetaBuilders.WebControls.DialogWindow" />
>>>>
>>>> path="FtbWebResource.axd"
>>>> type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
>>>>
>>>>type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha" />
>>>>
>>>>
>>>>
>>>>******************************************************** ****************************
>>>>
>>>>Scrollkeeper is apparently causing the problem but only as a Virtual
>>>>directory. It works fine when I access it as www.stfstage.com.
>>>>
>>>>If I take out the ScrollKeeper sections it seems to have a problem with
>>>>virtual paths and gets an error:
>>>>******************************************************** *******************************
>>>>The virtual path '/skins/mth/MainPage.ascx' maps to another application,
>>>>which is not allowed.
>>>>Description: An unhandled exception occurred during the execution of the
>>>>current web request. Please review the stack trace for more information
>>>>about the error and where it originated in the code.
>>>>
>>>>Exception Details: System.Web.HttpException: The virtual path
>>>>'/skins/mth/MainPage.ascx' maps to another application, which is not
>>>>allowed.
>>>>
>>>>Source Error:
>>>>
>>>>Line 27: navigation = "NavigateTop" & ".ascx"
>>>>Line 28: end if
>>>>Line 29: pageControl = LoadControl(thePage)
>>>>Line 30: thePlaceHolder.Controls.Add(pageControl)
>>>>Line 31: contentControl =
>>>>CType(thePlaceHolder.FindControl("_ctl0:Navigation"),Con trol)
>>>>
>>>>Source File:
>>>>C:\Inetpub\wwwroot\StfStage\jobSeeker\displaycompanyJobs .aspx Line: 29
>>>>******************************************************** *******************************
>>>>
>>>>My code that is causing the problem is:
>>>>
>>>>tePage = "/skins/" & session("CompanyInitials") & "/" & "MainPage" &
>>>>".ascx"
>>>>pageControl = LoadControl(thePage)
>>>>
>>>>How can I make this work in my scenario - or can I?
>>>>
>>>>Thanks,
>>>>
>>>>Tom