This should be easy... but I am missing something.
Currently, I have a website "running" asp.net 4.0, on shared server. Need to migrate site to another hosting company, but new one does not have same setup (limited use of virtual directory).
The site is setup on the server like this
./root/directory/subdir1/subdir2/*.aspx (webconfig here as well)
We have a virtual directory "vdir = directory/subdir1/subdir2" that allows us to keep the url simple, looking like
https://www.url.com/vdir/default.aspx
Multiple attempts, hours later, not able to resolve. Error is 500/40x, depending on setup.
What is best way to setup my web.configs?? I do not have access to root, server IIS.
Webconfig below.
Any suggestion is appreciated!
Good resource:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="ApplicationServices" connectionString="Data Source=*;Initial Catalog=*;Persist Security Info=True;User ID=*;Password=*" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<sessionState cookieless="AutoDetect" timeout="60" compressionEnabled="true"/>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms cookieless="AutoDetect" name=".AuthCookie" protection="All" path="/" loginUrl="~/Account/Login.aspx" defaultUrl="~/Default.aspx" timeout="60" slidingExpiration="true"/>
</authentication>
<machineKey validationKey="*"
decryptionKey="*"
validation="SHA1"
decryption="AES"/>
<membership defaultProvider="AspNetMembershipProvider" userIsOnlineTimeWindow="60">
<providers>
<clear />
<add name="AspNetMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="a" />
</providers>
</membership>
<profile defaultProvider="AspNetSqlProfileProvider" enabled="true">
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="a" />
</providers>
</profile>
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="a" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="a" />
</providers>
</roleManager>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
<location path="account">
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</location>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
UPDATE#1
1) tried in a parent/root path. Subdirectory/application asp does not render
2) tried creating web.confing at top /root, but didn't render
<location path="sub1/sub2r">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
3) created test.html file (simple html text/tags). Viewable at any location, directory, under and conditions... but simple aspx pages, in same locations, not running.
UPDATE #2 Tested basic fundamentals of the authorization, by folder, file, etc. Can view/see all folders, permissions work, network services, roles, etc all setup correct. Bottom line is that my web.config file can not be seen, because if does not have proper permission.
Still trying to find out how to resolve.