locked
ASP.Net Web Site Administration Tool Issue RRS feed

  • Question

  • User-836903616 posted

    Greetings all.

    I hope I am posting this issue to the correct forum.  I had a tough time determining where it belonged, but this seemed reasonable.

    I am absolutely stuck with a strange issue concerning the ASP.Net Web Site Administration Tool.  First let me detail the provider installation.

    I created a provider data store via aspnet_regsql.  I then editted web.config for my test web application to reference that database.

    Next, under IIS, I have created a web application for the tool (.Net 4.0 version) so that I can access via a URL: http://localhost/webadmin/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\Test&applicationUrl=/Test

    When I browse to the URL, the admistration tool does indeed load.  I can then navigate to all tabs EXCEPT the Security tab.  When I click on that tab, I am meet with an error: There is a problem with your selected data store...  Value cannot be null.  Parameter name: Path

    If I go to the Provider tab, I can sucessfully test the membership and role providers.  If I run my test application, I can sucessfully register a new user and see that user in the data store.  It just baffles me that I cannot open the Security tab to assign roles.  The really weird thing is that I can configure/run this app on my dev laptop (Windows 7, SQL Server 2008), and the Security tab is not an issue.  But on the web server...

    Here are a few details about server.  The server is running Windows Server 2003 Enterprise.  ASP.NET version 4.0.30319.0 is installed.  The database server is SQL Server 2005.

    The provider related sections of the web.config are as follows:

     <connectionStrings><add name="ApplicationServices" connectionString="server=localhost\Test; database=ProviderStore; trusted_connection=false; user id=USER; password=PW; connection timeout=20" providerName="System.Data.SqlClient" /></connectionStrings>

    <membership><providers><clear /><add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" applicationName="/"              enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"              maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" /></providers>     </membership>

    <profile><providers><clear /><add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /></providers></profile>

    <roleManager enabled="true"><providers><clear /><add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />         <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> </providers></roleManager>

    The event log entry for the issue is as follows:

    Event Type: Error Event Source: ASP.NET 4.0.30319.0 Event Category: None Event ID: 1325 Date:  9/27/2012 Time:  1:47:02 PM User:  N/A Computer: BASTIAN-TS Description: Failed to initialize the AppDomain:5465800b

    Exception: System.Web.HttpException

    Message: Value cannot be null. Parameter name: path

    StackTrace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()    at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel)    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel)    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

    InnerException: System.ArgumentNullException

    Message: Value cannot be null. Parameter name: path

    StackTrace:    at System.IO.Path.GetFullPath(String path)    at System.Web.Util.FileEnumerator..ctor(String path)    at System.Web.Hosting.MapPathBasedVirtualPathEnumerator..ctor(VirtualPath virtualPath, RequestedEntryType requestedEntryType)    at System.Web.Hosting.MapPathBasedVirtualPathCollection.System.Collections.IEnumerable.GetEnumerator()    at System.Web.Compilation.CodeDirectoryCompiler.ProcessDirectoryRecursive(VirtualDirectory vdir, Boolean topLevel)    at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed)    at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories)    at System.Web.Compilation.BuildManager.CompileCodeDirectories()    at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

    I have been working to resolve this issue for many hours, and I am at wits end.  Any help in resolving this problem would be greatly appreciated.

    Thanks in advance.

    Walt

     

     

     

    Thursday, September 27, 2012 2:43 PM

All replies

  • User-359936451 posted

    I am still reading your post, but could you update the version info for the your IDE and database, what version of Visual Studio and hopefully MS SQL are you using? Ok catching up, you need to change the configuration stings on the server. 

    On your dev PC this will work: connectionString="server=localhost\Test; database=ProviderStore

    On the production server the DB name should be something like: connectionString="server=MSSQL     FYI, If you were using Sql Express the name would be something like:   connectionString="server=./SQLEXPRESS

    You look up the named instance in the SQL Config tools that install with SQL.  Check here:   https://www.connectionstrings.com/sql-server-2005/

    Basically between server and dev PC you are talking to the database using different connection techniques, the web config must use the correct connection string in each environment.

    Friday, July 21, 2017 8:03 PM