0

I have hosted a website. The dataconnection I am using is (web.config file)

It works fine on the localhost but when run over the internet, it gives error that access to databse is not possible. (please visit www.ezitek.somee.com for detailed error) I think I need to change the connection string, but I do not know what to do.

When hosted, my database is in App_Data folder of my solution, which has been uploaded as it is.

My host has given me the following detail:

Website local path: d:\DZHosts\LocalUser\fsehgal\www.ezitek.somee.com Protected local path: d:\DZHosts\LocalUser\fsehgal\Protected.ezitek.somee.com

Please advise what to do to avoid this error.

Thank you very much. With best regards, Furqan

1 Answer 1

0

try replacing your AttachDBFilename in your connection with something similar to this

AttachDBFilename=|DataDirectory|\DB.mdf;
Sign up to request clarification or add additional context in comments.

2 Comments

maybe the database file is protected against modification or writing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.