4

I'm trying to deploy an ASP.NET web app connected to a SQL Server database. I'm trying to attach the database by uploading the .mdf file but I always get an error:

System.Web.Services.Protocols.SoapException: Server was unable to process request.
--->
System.UnauthorizedAccessException: Access to the path 'c:\dzsqls\krginventorydb2.mdf' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at DZWebSvc.DZWebAgent.AttachNewUserDBDataFileOnly(String DBName, String LoginName, String OriginalDBFileName, String OriginalLogFileName, String NewDBFileName, Int32 MaxDataFileSizeMB, Int32 MaxLogFileSizeMB, String ConnectionString, Boolean ChangeDefaultSchemaToDbo, String tk)
--- End of inner exception stack trace ---

I am aware that I need to detach the db if it's currently active and so i did. The size of it is small enough to not exceed the maximum. I don't know what's wrong. Help. :(

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Kristel
  • 41
  • 1
  • 2

1 Answers1

4

Alternatively you can deploy your database on somee.com by creating script of your database using Sql Server Managment Studio. Please watch my video to resolve this error.

Watch This