Problem in Publishing Website

Last post 04-25-2008 5:12 AM by shrawan8. 9 replies.

Sort Posts:

  • Problem in Publishing Website

    04-20-2008, 7:10 AM
    • Loading...
    • shrawan8
    • Joined on 03-18-2008, 7:18 AM
    • Bangalore
    • Posts 11

    Hi All,

     

    I've found the asp.net forum pretty amazing, just because of the quality people I met. Their guidance and help solved all the problems i asked the solutions for. I am really thankful to all of them.

    Going ahead, there's one more thing, i need your help.

    I downloaded PERSONAL WEBSITE STARTER KIT from www.asp.net, made some changes and kept it ready for publishing on web. Then I took the Windows hosting package few days back. Which includes MS SQL Database (100 MB). After that I uploaded/published the data/project on website at the CORRECT location (in its root directory). But when i tried to open the website, it gave error related to  <CustomErrors> tag in web.config file. (u can see that error , the site is www.shrawan.com). I asked host about it and he wrote following guidelines to me, which i couldnt follow and work upon.

    "when you buy MS SQL 2005/2000 database from us, the database cannot be connected directly to the database file like in MS SQL Express edition. The database has to be uploaded using Ms SQL Studio and then it has to be connected using the TCP/IP connection string." 

     Now can anyone walk me through the steps i need to follow , to publish the website successfully running.

     

    Thanks in advance.

    Mohit S.

    +919972040808 

    Mohit Shrawan
  • Re: Problem in Publishing Website

    04-20-2008, 8:20 AM
    • Loading...
    • mr.aspdotnet
    • Joined on 08-11-2007, 5:57 AM
    • Manchester, UK
    • Posts 281

    Hi,

    Probably there is an error occuring when you connect and because you are setting you custom errors to RemoteOnly or Off you are shown this generic error.

    I suggest that you change your custom errors to On temporarly then access your web site and you should see the detailed error, otherwise access your website from your web server but I think you will not be able to do that if the hosting package is shared i.e. not dedicated server.

    Regards

    Don't forget to click (Mark as Answer) on the post that helped to solve your problem.
  • Re: Problem in Publishing Website

    04-21-2008, 11:05 AM
    • Loading...
    • shrawan8
    • Joined on 03-18-2008, 7:18 AM
    • Bangalore
    • Posts 11

    I tried changing the custom mode to ON, but could'nt see any difference. And the hosting package is commercial, that means i guess, it is non-dedicated/shared server. So that can't be tried perhaps.

    So what i'm supposed to do now?

     

    Pls help.

    Thanks

    Mohit S.
     

    Mohit Shrawan
  • Re: Problem in Publishing Website

    04-21-2008, 12:20 PM
    • Loading...
    • mr.aspdotnet
    • Joined on 08-11-2007, 5:57 AM
    • Manchester, UK
    • Posts 281

    Hi,

    Can you please post your web.config file.

    Regards 

    Don't forget to click (Mark as Answer) on the post that helped to solve your problem.
  • Re: Problem in Publishing Website

    04-21-2008, 9:25 PM
    • Loading...
    • whighfield
    • Joined on 01-02-2006, 5:37 PM
    • Winterpeg, Manitoba
    • Posts 220

    shrawan8:

    "when you buy MS SQL 2005/2000 database from us, the database cannot be connected directly to the database file like in MS SQL Express edition. The database has to be uploaded using Ms SQL Studio and then it has to be connected using the TCP/IP connection string." 

    What your hosting provider is saying is that it does not support SQL Server 2005 Express and the auto attach feature for database files.  You will probably have to manually create the database through your hosting service control panel and then use the SQL Server Management Studio Express found here to create all of the tables/stored procedures and such via scripts.

    There are a few sites that go into it deeper as well this forum has lots of threads on how to do this.

    One of the sites is ASP Starter Kit Help and Sue's edream has a blog post about it as well.

    - William

    Please mark the most helpful reply/replies as "Answer".

    Give my enhanced version of the PWSK a look.
    www.willyd.ca
  • Re: Problem in Publishing Website

    04-22-2008, 2:57 AM
    • Loading...
    • shrawan8
    • Joined on 03-18-2008, 7:18 AM
    • Bangalore
    • Posts 11

    Hi,

    following is what the web.config file contains.

    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
        <connectionStrings>
            <add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/>
            <remove name="LocalSqlServer"/>
            <add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>
        </connectionStrings>
        <system.web>
            <pages styleSheetTheme="White"/>
            <customErrors mode="Off"/>
            <compilation debug="true"/>
            <authentication mode="Forms">
                <forms loginUrl="Default.aspx" protection="Validation" timeout="300"/>
            </authentication>
            <authorization>
                <allow users="*"/>
            </authorization>
            <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
            <roleManager enabled="true"/>
            <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
                <providers>
                    <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
                </providers>
            </siteMap>
        </system.web>
        <location path="Admin">
            <system.web>
               <authorization>
                    <allow roles="Administrators"/>
                    <deny users="*"/>
                </authorization>
        </system.web>
        </location>
    </configuration>

     

     

    Thanks,

    Mohit S. 

     

    Mohit Shrawan
  • Re: Problem in Publishing Website

    04-22-2008, 3:00 AM
    • Loading...
    • shrawan8
    • Joined on 03-18-2008, 7:18 AM
    • Bangalore
    • Posts 11

    I think you're right william. I think I need to manually create the database, run the script for tables and then change the web.config file accordingly. I'll do it and then lets see wat happens.

     


    thanks for your suggestion

     

    Mohit Shrawan
  • Re: Problem in Publishing Website

    04-22-2008, 1:08 PM
    • Loading...
    • shrawan8
    • Joined on 03-18-2008, 7:18 AM
    • Bangalore
    • Posts 11

    Hi Williams,

    I tried manually creating the database using SQL Server Management Studio after connecting to server, ran the script (personal-add.sql) for creating tables and then changed the web.config file as follows.

     

    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
        <connectionStrings>
        <add name="Personal" connectionString="Data Source=74.86.xx.xxx;Initial Catalog=databasename;Persist Security Info=True;UID=uidgivenbyhost;PWD=passwordgivenbyhost" providerName="System.Data.SqlClient" />
      </connectionStrings>
        <system.web>
            <pages styleSheetTheme="White"/>
            <customErrors mode="Off"/>
            <compilation debug="true"/>
            <authentication mode="Forms">
                <forms loginUrl="Default.aspx" protection="Validation" timeout="300"/>
            </authentication>
            <authorization>
                <allow users="*"/>
            </authorization>
            <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
            <roleManager enabled="true"/>
            <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
                <providers>
                    <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML

    files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
                </providers>
            </siteMap>
        </system.web>
        <location path="Admin">
            <system.web>
               <authorization>
                    <allow roles="Administrators"/>
                    <deny users="*"/>
                </authorization>
        </system.web>
        </location>
    </configuration>

     

     

    I think database has been created on server. As this time the error thrown by my site (www.shrawan.com) has changed. Now the error is about ROLES. Please see the url for the errors and suggest me wat to do next, to overcome it.

    Thanks 

     

     

    Mohit Shrawan
  • Re: Problem in Publishing Website

    04-22-2008, 9:50 PM
    Answer
    • Loading...
    • whighfield
    • Joined on 01-02-2006, 5:37 PM
    • Winterpeg, Manitoba
    • Posts 220

    Tried loading your site and got the error "An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

    Is the IP address for the Data Source correct?  Most hosting companies that I have dealt with usually give you a server name rather than an IP address.

    - William

    Please mark the most helpful reply/replies as "Answer".

    Give my enhanced version of the PWSK a look.
    www.willyd.ca
  • Re: Problem in Publishing Website

    04-25-2008, 5:12 AM
    Answer
    • Loading...
    • shrawan8
    • Joined on 03-18-2008, 7:18 AM
    • Bangalore
    • Posts 11

    Hi William,

     

    Thanks for your help. I got solution to my problems by what you told me to do. First i manually created database and tables on server. then changed the web.config file with the CORRECT server name. And it worked fine... :-)

     

    Thanks once again.

    Mohit S.
     

    Mohit Shrawan
Page 1 of 1 (10 items)