You must Sign In to post a response.
  • Category: Windows 8

    Can't acces SQL Server Express Database in IIS server?

    I have an application ASP.net MVC in the neighborhood. I'm working with VisualStudio 2017 and IIS Express and SQL Server Express. I have attempted to put my undertaking on IIS nearby on my PC. My application can be executed on my program yet I can't make some demand with my SQL Server Express since my code is on IIS. I think SQL Server Express needs a few parameters yet I don't discover them.

    My association string is :

    this.Database.Connection.ConnectionString = "Server=" + NameServer + "; Database=" + NameDatabase + "; Integrated Security = genuine";

    I utilize local SQL Server Express I don't know whether it's an issue If you have a few thoughts?

    Kosmiktechnologies.com
  • #769454
    you should attached SQLExpress keyword in your connection string.
    see below sample connection string
    'provider=sqloledb; datasource=IP\sqlexpress; uid=sa; pwd=test@123; database=test '

    if your database server is same then you can use localhost or server name, instead of IP address
    Hope it helps

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #769460
    I think your SQL Express is not configured to access remotely. Please refer below article and configure the DB accordingly and try again.

    blogs.msdn.microsoft.com/sqlexpress/2005/05/05/how-to-configure-express-to-accept-remote-connections/

    Let me know if this doesn't help.


    Regards,
    Asheej T K


  • Sign In to post your comments