I am looking for a way to use ASP.NETWebAdminFiles on a "live" server running Windows Server 2003, .NET Framework 2.0 Beta 2, and SQL Server Express 2005 CTP.
In IIS I have a few sites configured (and the default site removed), and I am trying to use ASP.NETWebAdminFiles to configure these sites. All these sites respond to different host headers. I configured ASP.NETWebAdminFiles as a virtual application on one
of these sites (by web sharing the ASP.NETWebAdminFiles folder), and configured the site to respond to localhost:8001 (in order to have Windows authentication) but that didn't help much.
I'm not sure web sharing ASP.NETWebAdminFiles is the thing to do, or I have to make copies of ASP.NETWebAdminFiles. Also, I'm not sure how to configure the copy/copies of ASP.NETWebAdminFiles to work with the correct membership and role providers for the respective
application.
I was aware about the security concerns and the fact that webadmin.axd was dropped in beta 2. I actually intended to use ASP.NETWebAdminFiles from the Administrator account of my server, locally on the server only.
Aside from the websites available on my server, I created a website that responds to the localhost host header and allows only integrated Windows authentication. I believe that's pretty safe and can only be accessed. I added ASP.NETWebAdminFiles as an application
running on that site, and I am able to run it, but when I provide it the applicationPhysicalPath and applicationUrl parameters in the url I get an "Access is denied for the application you are trying to administer." error on page home1.aspx.
I am currently looking at the code for ASP.NETWebAdminFiles and I believe it's the ApplicationManager that cannot access the application I'm trying to administer (either because I don't have the right permissions or I'm passing the parameters incorrectly).
Based on your answer, I am not sure if it will not work on IIS no matter what, or it is recommended not to use it on IIS but only on Cassini/ASP.NET Development Server/WebDev.WebServer.exe? What is the suggested approach? Will there be a WebAdmin in the release
of ASP.NET 2.0? Will everyone have to develop their own WebAdmin-like tool?
I have an update to my last message yesterday (while I'm a bit disappointed that nobody seems interested to get this thing working).
I did some more testing on a Virtual PC running the same configuration as my dedicated server with some success.
Scenario 1: In the default web site (responding to all IP addresses on port 80 and no host header value), I created a test application (to be configured by ASP.NETWebAdminFiles) and another application for ASP.NETWebAdminFiles. I started the test application
in a browser, then I started the second application, ASP.NETWebAdminFiles, in a second browser and set applicationPhysicalPath and applicationUrl to the appropriate values. I got ASP.NETWebAdminFiles running perfectly, I was able to edit existing members
and roles and add new ones.
Scenario 2: I created a new website (also responding to all IP addresses on port 80 and no host header value), and I created the same applications as in Scenario 1. I disabled the default site (so the new web site will pickup the HTTP requests). I started
the test application in a browser and it worked. Then I started ASP.NETWebAdminFiles in a second browser and again I set applicationPhysicalPath and applicationUrl to the appropriate values. It did not work, I got the same error as yesterday -- "Access is
denied for the application you are trying to administer." on page home1.aspx.
Further Testing: I switched back and forth between the two websites, keeping just one enabled at all times and the default web site always worked while the second web site never did. I believe there are two reasons I'm not getting ASP.NETWebAdminFiles to run
on the second web site, either I was not able to configure the second site identical to the first site (the physical files are the same, so no worries there), or there's a binding in the ASP.NETWebAdminFiles to the default web site (Identifier 1). I pursued
the first possibility and I checked all settings in IIS and I didn't see any differences there, then I created two settings files from the two web sites and I did see some differences there but I'm no expert in that. I'm looking into debugging ASP.NETWebAdminFiles
on the second site right now, and possibly see where the error occurs.
I'm really interested if anyone has any feedback on this...
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site at System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String& locationSubPath, String& configPath, String& locationConfigPath,
IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams) at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type
typeConfigHost, Object[] hostInitConfigurationParams) at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String
password, IntPtr tokenHandle) at System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr
userToken) at System.Web.Configuration.WebConfigurationManager.OpenMappedWebConfiguration(WebConfigurationFileMap fileMap, String path) at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, String appPhysPath, Boolean getWebConfigForSubDir)
in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line 316 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, Boolean getWebConfigForSubDir) in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line
299 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path) in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line 294 at System.Web.Administration.WebAdminPage.VerifyAppValid() in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line
413
I used ApplicationManager and ApplicationInfo and I was able to validate that the virtual and physical paths are correct.
The WebAdminTool is intended for use only on the Cassini server, which is why it is not so easy for you to get it to work on IIS. Also, as you already know, it can be configured to work in IIS. The available functionality you currently see in Beta2 will likely
be the same functionality you will see in the final release of ASP.Net 2.0. There is an Administration tool that will ship in IIS 7.0 that will be the recommended approach to configuring web apps.
How did you create your second site? are you mapping it to the same physical directory as the original site? Could you specify what values you're passing in through the url? the WebAdminTool uses FileMappings which doesn't rely on any iis metabase values.
This posting is provided "AS IS" with no warranties, and confers no rights.
On a Virtual PC running everything described above and VS2005 Beta 2, I have everything working, both on the default site and another site setup the same way as the default site.
On a live server running everything described above, but the .NET Framework 2.0 Beta 2 RTM and NOT VS2005 Beta 2, I cannot get it to run. I have one web site defined as responding to every request on port 80 (it's not the default web site though, I removed
that a while back when I got the server), and I have to virtual applications defined, one is ASP.NETWebAdminFiles, the other one is my test application. I am using something like:
http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\WebSiteSandbox\&applicationUrl=/WebSiteSandbox. And ASP.NETWebAdminFiles and WebSiteSandbox are located under the same web site. The error I get is the one in
my previous message, not sure what permissions I'm missing. Physically everything is under wwwroot for testing purposes.
any luck on this? i'm still thinking about this but am not quite sure what the problem would be. i haven't had time to try to set this up and am not sure when i will. have you been able to make any progress?
This posting is provided "AS IS" with no warranties, and confers no rights.
I wasn't able to move any further with this, I'm thinking that there must be some sort of permission issues. Ultimately I was able to get it to work on a server with VS2005 installed but not able to get it to work on a server with .NET 2.0 RTM only (both servers
running Beta 2).
From the message I was getting it must have been permission related, but I did not have the time to do further debugging. I started debugging on the "live" box, but I had to do it ASP style, by inserting Response.Write lines here and there in the ASPX pages
as well as the file in the Code folder -- not my favorite weekend activity.
I guess if you have a way to find out what the runtime error I was receiving really means, and what permissions are required, that would help me move forward. At any rate, your help is greatly appreciated.
rgramaPI
Member
170 Points
34 Posts
Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 16, 2005 06:01 PM|LINK
I am looking for a way to use ASP.NETWebAdminFiles on a "live" server running Windows Server 2003, .NET Framework 2.0 Beta 2, and SQL Server Express 2005 CTP.
In IIS I have a few sites configured (and the default site removed), and I am trying to use ASP.NETWebAdminFiles to configure these sites. All these sites respond to different host headers. I configured ASP.NETWebAdminFiles as a virtual application on one of these sites (by web sharing the ASP.NETWebAdminFiles folder), and configured the site to respond to localhost:8001 (in order to have Windows authentication) but that didn't help much.
I'm not sure web sharing ASP.NETWebAdminFiles is the thing to do, or I have to make copies of ASP.NETWebAdminFiles. Also, I'm not sure how to configure the copy/copies of ASP.NETWebAdminFiles to work with the correct membership and role providers for the respective application.
Thanks,
Radu
bobbyv
Member
410 Points
82 Posts
Microsoft
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 17, 2005 12:31 AM|LINK
rgramaPI
Member
170 Points
34 Posts
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 17, 2005 02:29 AM|LINK
Aside from the websites available on my server, I created a website that responds to the localhost host header and allows only integrated Windows authentication. I believe that's pretty safe and can only be accessed. I added ASP.NETWebAdminFiles as an application running on that site, and I am able to run it, but when I provide it the applicationPhysicalPath and applicationUrl parameters in the url I get an "Access is denied for the application you are trying to administer." error on page home1.aspx.
I am currently looking at the code for ASP.NETWebAdminFiles and I believe it's the ApplicationManager that cannot access the application I'm trying to administer (either because I don't have the right permissions or I'm passing the parameters incorrectly).
Based on your answer, I am not sure if it will not work on IIS no matter what, or it is recommended not to use it on IIS but only on Cassini/ASP.NET Development Server/WebDev.WebServer.exe? What is the suggested approach? Will there be a WebAdmin in the release of ASP.NET 2.0? Will everyone have to develop their own WebAdmin-like tool?
Thanks,
Radu
rgramaPI
Member
170 Points
34 Posts
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 17, 2005 10:28 PM|LINK
I have an update to my last message yesterday (while I'm a bit disappointed that nobody seems interested to get this thing working).
I did some more testing on a Virtual PC running the same configuration as my dedicated server with some success.
Scenario 1: In the default web site (responding to all IP addresses on port 80 and no host header value), I created a test application (to be configured by ASP.NETWebAdminFiles) and another application for ASP.NETWebAdminFiles. I started the test application in a browser, then I started the second application, ASP.NETWebAdminFiles, in a second browser and set applicationPhysicalPath and applicationUrl to the appropriate values. I got ASP.NETWebAdminFiles running perfectly, I was able to edit existing members and roles and add new ones.
Scenario 2: I created a new website (also responding to all IP addresses on port 80 and no host header value), and I created the same applications as in Scenario 1. I disabled the default site (so the new web site will pickup the HTTP requests). I started the test application in a browser and it worked. Then I started ASP.NETWebAdminFiles in a second browser and again I set applicationPhysicalPath and applicationUrl to the appropriate values. It did not work, I got the same error as yesterday -- "Access is denied for the application you are trying to administer." on page home1.aspx.
Further Testing: I switched back and forth between the two websites, keeping just one enabled at all times and the default web site always worked while the second web site never did. I believe there are two reasons I'm not getting ASP.NETWebAdminFiles to run on the second web site, either I was not able to configure the second site identical to the first site (the physical files are the same, so no worries there), or there's a binding in the ASP.NETWebAdminFiles to the default web site (Identifier 1). I pursued the first possibility and I checked all settings in IIS and I didn't see any differences there, then I created two settings files from the two web sites and I did see some differences there but I'm no expert in that. I'm looking into debugging ASP.NETWebAdminFiles on the second site right now, and possibly see where the error occurs.
I'm really interested if anyone has any feedback on this...
Thanks,
Radu
rgramaPI
Member
170 Points
34 Posts
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 18, 2005 04:25 AM|LINK
It's failing as in:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site at System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String& locationSubPath, String& configPath, String& locationConfigPath, IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams) at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) at System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) at System.Web.Configuration.WebConfigurationManager.OpenMappedWebConfiguration(WebConfigurationFileMap fileMap, String path) at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, String appPhysPath, Boolean getWebConfigForSubDir) in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line 316 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, Boolean getWebConfigForSubDir) in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line 299 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path) in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line 294 at System.Web.Administration.WebAdminPage.VerifyAppValid() in c:\Inetpub\wwwroot\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line 413
I used ApplicationManager and ApplicationInfo and I was able to validate that the virtual and physical paths are correct.
Anyone?
Thanks,
Radu
bobbyv
Member
410 Points
82 Posts
Microsoft
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 21, 2005 12:41 AM|LINK
How did you create your second site? are you mapping it to the same physical directory as the original site? Could you specify what values you're passing in through the url? the WebAdminTool uses FileMappings which doesn't rely on any iis metabase values.
rgramaPI
Member
170 Points
34 Posts
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jun 23, 2005 08:16 PM|LINK
Bobby,
Thank you for your time.
On a Virtual PC running everything described above and VS2005 Beta 2, I have everything working, both on the default site and another site setup the same way as the default site.
On a live server running everything described above, but the .NET Framework 2.0 Beta 2 RTM and NOT VS2005 Beta 2, I cannot get it to run. I have one web site defined as responding to every request on port 80 (it's not the default web site though, I removed that a while back when I got the server), and I have to virtual applications defined, one is ASP.NETWebAdminFiles, the other one is my test application. I am using something like: http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\WebSiteSandbox\&applicationUrl=/WebSiteSandbox. And ASP.NETWebAdminFiles and WebSiteSandbox are located under the same web site. The error I get is the one in my previous message, not sure what permissions I'm missing. Physically everything is under wwwroot for testing purposes.
Thanks,
Radu
bobbyv
Member
410 Points
82 Posts
Microsoft
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jul 07, 2005 05:59 AM|LINK
rgramaPI
Member
170 Points
34 Posts
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jul 07, 2005 02:30 PM|LINK
Thank you for your message.
I wasn't able to move any further with this, I'm thinking that there must be some sort of permission issues. Ultimately I was able to get it to work on a server with VS2005 installed but not able to get it to work on a server with .NET 2.0 RTM only (both servers running Beta 2).
From the message I was getting it must have been permission related, but I did not have the time to do further debugging. I started debugging on the "live" box, but I had to do it ASP style, by inserting Response.Write lines here and there in the ASPX pages as well as the file in the Code folder -- not my favorite weekend activity.
I guess if you have a way to find out what the runtime error I was receiving really means, and what permissions are required, that would help me move forward. At any rate, your help is greatly appreciated.
Thanks,
Radu
nick.brunch
Member
2 Points
1 Post
Re: Suggestions on how use ASP.NETWebAdminFiles on a "live" server?
Jul 21, 2008 09:39 PM|LINK
Try this article. It gives you two solutions on how to achieve this.
http://nishantpant.wordpress.com/2008/05/22/how-to-provide-aspnetwebadminfiles-wsat-like-user-management-for-your-hosted-or-online-site/
-Nick