locked
Classified starter kit in IIS 5.1 or 6 unable to deploy RRS feed

  • Question

  • User22979290 posted

     Hi everybody,

     

    When i have installed and developed this starter kit with local web server all work but i can't deploy it in IIS.

     Always i have the error


     System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
    Login failed for user "aspnet/machinename"

    I have try all u can logically immagine

     add user, impersonation but nothing look to work..

     Please if you have any suggestion tell me..

     Thanks in advance

    Wednesday, December 17, 2008 2:43 PM

All replies

  • User730446648 posted

    It's having trouble connecting to your databases.
    The problem is in your connection strings in your web.config

    Wednesday, December 17, 2008 8:08 PM
  • User22979290 posted

     i try but your solution not work..

     Thanks

     Another suggestion please?

     

     

    Thursday, December 18, 2008 3:54 AM
  • User730446648 posted

    How do you know what you tried is right?

    Post your connection strings in your web.config

    Don't forget to xxxxxx out your passwords.

    And what host provider are you using?

    Thursday, December 18, 2008 9:32 AM
  • User22979290 posted

    You welcome

    But i don't think is about connection string 

     

       <add name="classifiedsConnection" connectionString="   Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Luigi Corrias\My Documents\Visual Studio 2005\WebSites\Classifieds\App_Data\CLASSIFIEDSDB.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"  />

    Friday, December 19, 2008 3:51 AM
  • User730446648 posted

    Like I said it's wrong.

    What you have, as is above, when you first run the kit works fine on your local computer,
    and it needs to stay as you already have it for your local computer.

    I have a online web.config that is obviosly only for online use.
    In your online version you conection strings should look something like this.

    <connectionStrings>
        <add name="classifiedsConnection" connectionString="Data Source=whsql-vxxxxxxxxxxsecureserver.net;
          Initial Catalog=xxxxxxxxxx;
          User ID=user;
          Password='Pass';" />

        <remove name="LocalSqlServer"/>

        <add name="LocalSqlServer" connectionString="Data Source=whsql-xxxxxxxxxxxx.secureserver.net;
          Initial Catalog=xxxxxxxxxxxx;
          User ID=user;
          Password='pass';" />

      </connectionStrings>

    There are two databases, the first string points to your classifieds database.
    And the second points to the members database.

    Keep in mind that the settings I have shown you above are for godaddy.
    Your's is probably close, but not exact.

    You will need to contact your host provider, whoever that may be, to find out exactly what it should be.

    If it is godaddy, I recently did a walk through with someone else, it may help you.

    http://forums.asp.net/t/1351897.aspx

    Good Luck

    - Daniel

    Friday, December 19, 2008 8:40 PM
  • User22979290 posted

    thanks for your answer;

     i try  asap but i have another one please...

     how i can add an user, with the role of admin, to check admin page?

    Thanks for your attention

     Luigi  [:)]

     

     

    Sunday, December 21, 2008 4:52 PM
  • User730446648 posted

    See another of my post in this forum.

    http://forums.asp.net/t/1362671.aspx

    Sunday, December 21, 2008 6:22 PM
  • User22979290 posted

    welL...

     IF I UNDERSTAND IT IS POSSIBLE ACHIEVE THIS ONLY USING CONNECTION STRING GIVED BY HOSTING PROVIDERS..

     iT NOT POSSIBLE GIVE MY USUAL LOCAL CONNECTION STRING IN c:\INETPUB?

     THANKS

    Monday, December 22, 2008 6:35 AM
  • User730446648 posted

    It has to be one or the other.

    So what I did is changed it to the online connection string version, save it,
    uploaded it, made sure it works right, undid the changes I just made, and saved it again.

    This way my local works, and online works.

    When you get it right, I highly recommend making a backup of everything.

     

     

    Monday, December 22, 2008 10:07 AM
  • User22979290 posted

    please my database are in c:\inetpub\classified\app_data\ aspnet.mdf or classifieddb.mdf

     could you write me a sample code connection string working?

     

    as little xma s gift [:)]

     

    Monday, December 22, 2008 10:23 AM
  • User730446648 posted

    I already gave you a sample working with godaddy.

    And those .mdf files are your local databases.
    You have to create new databases online in your host provider's control panel.
    I recommend using MSSQL databases.

    And then you use scripts, as mentioned earlier, to fill the database.

     

    Monday, December 22, 2008 12:38 PM
  • User22979290 posted

    I am in Italy  i dont know nothing about godaddy

    i just want try to test this stuff using my localhost IIS on my laptop

    This is  my connection string


     < connectionStrings>
        <add name="classifiedsConnection" connectionString="Data Source=whsql-vxxxxxxxxxxsecureserver.net;
          Initial Catalog=CLASSIFIEDSDB.mdf;
    " />

        <remove name="LocalSqlServer"/>

        <add name="LocalSqlServer" connectionString="Data Source=whsql-xxxxxxxxxxxx.secureserver.net;
          Initial Catalog=ASPNETDB.MDF;
    " />

      </connectionStrings>

     

    Not work

     

    what can i write here ?

     

    "Data Source=whsql-v????????????secureserver.net;

     

    Thanks and happy xmas

    Tuesday, December 23, 2008 11:20 AM
  • User730446648 posted

    Who are you hosting with?

    Did you create the new databases like I told you?

     

    Tuesday, December 23, 2008 1:00 PM
  • User22979290 posted

    I want test this starter kit in my IIS

     No hosting provider marry xmas

    Wednesday, December 24, 2008 4:33 PM
  • User730446648 posted

    If this is just a problem connecting on your local computer, you do nothing.

    All you need is the .net framework installed,
    and run your kit in Visual Web Developer or Visual Studio.

    If you are did that, then I don't know.

    I have seen other post before in this forum where they were trying to test it on a local intranet network.
    I guess it can be a pain.

    No idea how to fix that though.

    Good Luck

    Wednesday, December 24, 2008 9:09 PM