Hi
I have setup the membership schema on a hosted server using the asp_regsql.exe tool fine. I have setup roles/memberships using the website adminitraion tool and i have checked that its all being entered into my hosted MSSQL server. I have also setup my web.config file to point to the hosted server and all seems to be connecting ok! When i test/debug my project locally (using the F5 key), my login box works fine!
How ever, i have now uploaded my project to my hosted server. If i put an incorrect login, then i get the usual 'Your login attempt was not successful. Please try again.' - So i know its connecting to the right database. How ever, when i enter the correct login details, i get the following error:
An error has occurred while establishing a connection tothe server. When connecting to SQL Server 2005, this failure may becaused by the fact that under the default settings SQL Server does notallow remote connections. (provider: SQL Network Interfaces, error: 26- Error Locating Server/Instance Specified)
...if its connecting to the same database fine when i test it from my local machine, why will it not work when i test it from my hosted server?
 thanks
 
Hi
 I've got it working now, how ever the problem seems to be somthing to with trying to access a page which is not in the root.  I placed a new folder called 'admin' into my root folder.  Inside the admin folder i placed a login.aspx and a default.aspx page.
In my web.config i placed:
    <authentication mode="Forms">
      <forms loginUrl="4dm1n/login.aspx" />
    </authentication>
When logging on using this folder system is when the error occurs!
Any ideas what i need to change in order to get the scope right?
|||found the problem - I hadn't declared the roleManager provider, eg
<roleManager enabled="true" defaultProvider="CustomizedRoleProvider">
      <providers>
        <add name="CustomizedRoleProvider"
             type="System.Web.Security.SqlRoleProvider"
             connectionStringName="BVDB" />
      </providers>
    </roleManager>
duh!
 
No comments:
Post a Comment