ASP.NET: How to deploy App_Data to webhost?

后端 未结 2 442
-上瘾入骨i
-上瘾入骨i 2020-12-21 11:24

I have uploaded my website to my webhost and it works great except the form authorication. When i try to login at get this error:

A network-related or instance-s

相关标签:
2条回答
  • 2020-12-21 11:49

    Tick the "include files from the App_data folder" checkbox when publish.

    alt text http://img260.imageshack.us/img260/8891/appdatapublish.png

    0 讨论(0)
  • 2020-12-21 11:52

    Check if your server allows to run user instances. If it allows then you need not do anything and just upload the MDF file to the App_Data folder on the server and you're good to go. You can also include App_data for publish which will automatically pick-up the App_Data folder along with the content.

    If your server does not allow user instances then you need to perform following steps..

    Ask admin to give you a SQLServer database along with access credentials.

    From your Visual Studio right click on your database from the server explorer and select the option to PUBLISH TO PROVIDER. Follow the wizard steps and generate the SQL script with or without default data.

    alt text http://ruchitsurati.net/myfiles/db.png

    Connect to your Remote SQL Server from management studio and run the generated SQL script on the database given by your admin.

    Update the connection string in your application for deployment.

    0 讨论(0)
提交回复
热议问题