database connectivity

Discussion in 'Databases' started by akss, Apr 16, 2011.

  1. hello sir/ma'am!!

    We have made a website for mobile devices in asp.net. and have got a space on win host under the domain bvmobi.edulok.info.

    The site has uploaded without any problem, but the problem came when we are accessing the pages with database connectivity. Our database is in sql server 2000 and to be frank we are new to both sql server and asp.net. So we are actually not able find our point of mistake.
    I have read the steps to connect our database to database on your server through kb, but still we are not getting a clear picture. We are in urgent need of help.

    plz help !!
    :confused::confused::confused::confused:
     
  2. error occur when accesing database connectivity pages

    now our connection string problem is solved but when we access our pages with database connectivity this error occurs.

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    please help us!!!!!!!
     
  3. and when we are trying to access the database server site "https://www.s04.Winhost.com" we are getting the following error

    Server not found

    Firefox can't find the server at www.s04.Winhost.com.
    * Check the address for typing errors such as
    ww.example.com instead of
    www.example.com

    * If you are unable to load any pages, check your computer's network
    connection.

    * If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

     
    Last edited by a moderator: Oct 14, 2015
  4. Ray

    Ray

    There is no database server with "www.s04.Winhost.com". If your connection string has www.s04.Winhost.com you will get an error.
     
    Last edited by a moderator: Oct 14, 2015
  5. Data Source=tcp:s04.Winhost.com;Initial Catalog=DB_22532_bvjpr;User ID=DB_22532_bvjpr_user;Password=******;Integrated Security=False;

    This is our connection string!!!

    do you think there is any problem ??
    because if you open our site "bvmobi.edulok.info" you'll be able to access the pages which are not connected to database , in other words which are ststic but those pages having database connectivity are not accessible !!!! They result into some or the other kind of error..


    plz help !!:confused::confused::confused::confused:
     
    Last edited by a moderator: Oct 14, 2015

  6. I'VE BEEN HAVING THE EXACT SAME PROBLEM FOR THE PAST WEEK AND STILL CAN'T SOLVE IT!! I'M IN DESPERATE NEED OF HELP!!!

    I published my local sql server database to Winhost using the "Publishing your SQL 2008 database to the Winhost SQL 2008 Server" article and it worked out great locally, but the problem still persists online and I need to fix it NOW! I have not touched the connection string though, because I don't know how to do that, could that be the problem?? I've done everything the article says, therefore I don't know what the problem can be!!!
     
    Last edited by a moderator: Oct 14, 2015
  7. if it helps, this is my connection string (the one found in the control panel site manager):

    "Data Source=tcp:s04.Winhost.com;Initial Catalog=DB_23268_database1;User ID=DB_23268_database1_user;Password=******;Integrated Security=False;"
     
    Last edited by a moderator: Oct 14, 2015
  8. and one more thing..... when I try to backup my database in SQL server management studio, and I try to give it a known path in my computer, this message appears, not letting me save the backup into my PC:

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

    ------------------------------
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    The EXECUTE permission was denied on the object 'xp_fixeddrives', database 'mssqlsystemresource', schema 'sys'.
    The EXECUTE permission was denied on the object 'xp_fixeddrives', database 'mssqlsystemresource', schema 'sys'.
    The EXECUTE permission was denied on the object 'xp_fixeddrives', database 'mssqlsystemresource', schema 'sys'.
    The EXECUTE permission was denied on the object 'xp_fixeddrives', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

    For help, click: http://go.microsoft.com/fwlink?Prod...272&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------
     
  9. Ray

    Ray

    I'm taking you copied and paste whats exactly on the control panel. If you did that then you are typing the password incorrectly. You need to make sure you type the proper password. It would not be in asterisks "*".
    You cannot run the backup procedure on your SSMS against our SQL 2008 server. To do this means you will need SA rights to the SQL server. Because we are a shared hosting environment we cannot give you SA rights. Rather, go into your Winhost control panel and under the Site Manager/SQL Manager use the Backup/Restore tool provided for you in the control panel.

    http://support.Winhost.com/KB/a771/how-do-i-generate-or-restore-a-backup-of-my-database.aspx
     
    Last edited by a moderator: Oct 14, 2015
  10. Urgent help!!!!!!!!!!

    I backed up the database through the site manager and the problem is still there...and then I restored and the problem is still there.... WHAT ELSE???

    how can i type in the password in the connection string? could that be the problem?
     
  11. Ray

    Ray

    Do you have a URL for us to look at to see the error on our end?
     
  12. the URL of the domain??? it's: www.iglesiaentretodos.org
    if it's something else, tell me and I can give you any info you need!!!
     
  13. Ray

    Ray

    This is the error message I am getting when I pull up your site.

    The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.

    Try setting your applications trust level to either high or full.

    http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx
     
    Last edited by a moderator: Oct 14, 2015
  14. I tried it, but, well, two comments:

    1) The SSE provider error only appears when you click "Administracion". Go to "Adherir", "Noticias" or "Sitios de Interes" and the error is different, it's the same one posted earlier in this same thread...

    2) I tried changing the trust level in mi Web.Config file (there are actually two files in my application, one in the project folder and one inside the Views folder) but I couldn't find the specified code to change!!

    Here's my web.config file:

    First File (in the project folder):

    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=152368
    -->

    <configuration>
    <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
    providerName="System.Data.SqlClient" />
    <add name="Database1ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />
    <add name="DATABASE1_MDFConnectionString" connectionString="Data Source=USER\SQLEXPRESS;Initial Catalog=DATABASE1.MDF;Integrated Security=True"
    providerName="System.Data.SqlClient" />
    </connectionStrings>

    <system.web>
    <compilation debug="true" targetFramework="4.0">
    <assemblies>
    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </assemblies>
    </compilation>

    <authentication mode="Forms">
    <forms loginUrl="~/Account/LogOn" timeout="2880" />
    </authentication>

    <membership>
    <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
    enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
    maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
    applicationName="/" />
    </providers>
    </membership>

    <profile>
    <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
    </providers>
    </profile>

    <roleManager enabled="false">
    <providers>
    <clear/>
    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
    <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
    </providers>
    </roleManager>

    <pages>
    <namespaces>
    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Routing" />
    </namespaces>
    </pages>
    </system.web>

    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    </system.webServer>

    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    </configuration>


    Second File (in the Views folder):

    <?xml version="1.0"?>

    <configuration>
    <system.web>
    <httpHandlers>
    <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
    </httpHandlers>

    <!--
    Enabling request validation in view pages would cause validation to occur
    after the input has already been processed by the controller. By default
    MVC performs request validation before a controller processes the input.
    To change this behavior apply the ValidateInputAttribute to a
    controller or action.
    -->
    <pages
    validateRequest="false"
    pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <controls>
    <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
    </controls>
    </pages>
    </system.web>

    <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />

    <handlers>
    <remove name="BlockViewHandler"/>
    <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
    </handlers>
    </system.webServer>
    </configuration>


    Where's the trust level here???
     
  15. You don't have that setting in your config files.

    As a direct child node of system.web, in your first file, add the following:

    Code:
    <!-- set code access security trust level - this is generally set in the machine.config -->
        <trust level="Full" originUrl=".*" />
     

  16. thanks for the help!!! It actually worked!! Now when you go to "Administracion" the SSE error no longer appears, but I still can't log in because of the other error i get, which is the same as the other tabs....do you know how to fix this??
     
  17. AKSS, Did you figure out how to fix your problem??? I still haven't and we've got the same error!
     
  18. I fixed it!!! the site works perfectly EXCEPT FOR THE ADMINISTRATION PART!!! The thing is, I used the membership classes that come with Visual Studio 2010 for the login...and I have no idea how to upload that database because I don't have access to it from VS! how can I publish that database, or connect it in some way to my other database? it uses a defaul DB named aspnetdb.mdf....
     
  19. Ray

    Ray

  20. ok thanks, I'm going to try that now, but I have two questions... first, if I already have a database and I have the basic plan with you guys (that only allows one database), can I upload this other database as well?? is it a different kind of database or something?
    and second, I've been publishing my application using FTP, so if I change the deployment settings, do I have to publish using web deploy now??
     
  21. hi! I tried doing what the link you sent me said, but I only got to the part where I build a deployment package because affter that, the next instruction was about running a cmd file on my computer??? how is that deploying??? it said "you can deploy the package by using “/y” attribute"... I don't think that's how you expect me to deploy right??

    and as to configuring the publishSQL settings, the connection string for destination database was blank, and I left it that way because I didn't know what to put in there, but it obviously can't be blank!!!???...and the connection string for the source database was not the same one I have in the server, it was the kind of like the same one that's in the link, where the data source is SQLEXPRESS, and I also left that the way it was...but I have the feeling I have to change both of those, right? what am I supposed to change them to?

    thanks for the help!!
     
  22. Ray

    Ray

    Do you have an actual database server on your computer or are do you only have the mdf file? What SQL version are you running?
     
  23. I fixed it!!! the page is working great...thanks for all you help!!!!
     

Share This Page