开发者

how to connect .mdf in the App_ folder file in web hosting (ASPNET)

开发者 https://www.devze.com 2023-04-01 23:33 出处:网络
I am new in ASP DOT NET . I created a website in ASP DOT NET. I uploaded my *.MDF file in the App_Data folder in my web hosting .

I am new in ASP DOT NET .

I created a website in ASP DOT NET.

I uploaded my *.MDF file in the App_Data folder in my web hosting .

There is an App_Data folder in my http docs .

I uploaded a file called trdagingcalls.mdf in the App_Data folder.

I am using Grid view in my website to display the data stored in trdagingcalls.mdf file,

My connection string

<add name="ConnectionString" connectionString ="data source=.\SQLEXPRESS;database=trdagingcalls.mdf;Integrated Security=SSPI"/>

I am getting an error the error is

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: SQL Ne开发者_Go百科twork Interfaces, error: 26 - Error Locating Server/Instance Specified)

Please check this link you will get idea

http://www.mcxnsecalls.com/insert-calls.aspx

I want my website to read data from App_Data folder contain in the http docs

Can any one pls say mw where i am going wrong.

There Would be a great appreciation if someone could help me.

Thanks In Advance.


You need to drop the .mdf into your local App_Data and use the data configuration wizard. It will create all the needed connection strings and everything. The only bad part of doing it that way is that you can no manipulate the database like you can if you have it in the client (although you can change tables/views ..etc..etc)

It would definitely help to know your environment. You said you uploaded the .mdf. Where did you upload it to? Who is hosting it? If you are uploading, are you developing remotely? All these things play into getting you a correct answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消