Error when publishing...

Discussion in 'ASP.NET / ASP.NET Core' started by lukesb, Oct 30, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi Everyone

    I have just created a login and published it. When I try and log-in, I am getting an error. That error has changed a few times as I have been trying different things the last few days...

    If someone wouldn't mind having a look, my site address is

    www.shaftec.com

    and username is

    test

    and password is

    password.1

    I think it may be something to do with my connection string from the google searches I've been doing, but haven't really got a clue :confused:

    Also, if I just created a login page with the VS2008 login control and published that as my site, would I have to do anything to the web.config then to get it to work..? I only ask as I my login was the last thing I created...

    Thanks in advance anyway..!

    Cheers

    Luke
     
  2. Hi Luke,
    We help a lot of developers with this sort of thing, don't fret.
    Let me ask...Does this require the SQL Server membership and you created the roles locally? If so, have you added a DASP SQL Server?
    I can help with the web.config part that is no problem.
    All the best,
    Mark
     
  3. Hi Mark

    I'm not 100% sure what you mean, so you'll have to bear with me mate :D

    I did create the users locally though as I didn't want a create new user bit on my site. So, I'm guessing I need to add a DASP SQL Server (first time I've heard of that!)...

    I've been messing with everything so will stop now incase I absolutely ruin everything. Hopefully, the cavalry has now arrived with yourself...!

    Cheers

    Luke
     
  4. Doh!, is DASP Discount ASP..? In which case, yeh, I have added the service for that in my control panel. Penny just dropped when I re-read what you wrote...
     
  5. In order to get login functionality working on DASP using the SQL Server user membership / roles / profile (AKA application services) database schema you need to:

    1. Have a SQL Server database provisioned (I think you already have from what you have said so far)
    2. Install the schema to your database using aspnet_regsql.exe - more info about that here: http://msdn.microsoft.com/en-us/library/x28wfk74.aspx
    3. The next thing is to setup the applications' web.config to enable the services you need e.g. membership, roles, profile data etc. in other words configure the roleManager, membership and profile sections. This is a good place to start: http://aspnet.4guysfromrolla.com/articles/120705-1.aspx
    That's about it although it can be tricky to get working at first. I'd advise following the documentation very carefully and when something doesn't work, go back and read it again because it is quite easy to miss a step or overlook something important.
     
  6. Hey Joe, thanks mate... I'm gonna go get some reading done then..!

    May be back with some questions at some point, but thanks very much for steering me in the right direction...

    Cheers

    Luke
     
  7. Still no luck guys. Could you tell me if this is correct for my connection string in web.config please..?

    <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=serverName;Integrated Security=True;AttachDBFilename=|DataDirectory|ASPNETDB.MDF;User Instance=true" />
    </connectionStrings>
    <system.web>
     
  8. Hi,
    The Express DB is not support here for a connection but once you have added a SQL Server there is an Attach feature in the control panel to add that Express DB to your DASP SQL Server account.
    Once you add the SQL Server option the connection string for it will show in your Control Panel.
    All the best,
    Mark
     
  9. Hi Mark

    Saw the connection string in the control panel. Thanks for the heads up on that mate...

    Now I get

    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    Any ideas..?

    Cheers

    Luke
     
  10. Mark, it's working. I really can't thank you enough mate. I have had my head in my hands for 3 days now with this. Can't believe how easy it was...

    Thank you loads. Now I can get back to working on my site. Will no doubt speak again soon..!

    Cheers Mate

    Luke
     
  11. ...Awesome ;-)
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page