简体   繁体   English

System.Web.Services.Protocols.SoapException:服务器无法处理请求

[英]System.Web.Services.Protocols.SoapException: Server was unable to process request

i am using .net webservice for restoring the database in sqlserver. 我正在使用.net Web服务还原sqlserver中的数据库。 i am using SQLDMO.dll, to restoring database, when i run the app, i getting the following Error. 我正在使用SQLDMO.dll还原数据库,当我运行该应用程序时,出现以下错误。

System.Web.Services.Protocols.SoapException: Server was unable to process request. System.Web.Services.Protocols.SoapException:服务器无法处理请求。 ---> System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {10021CC1-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80070005. at DBReplicatorService.SQLDEMOScripts..ctor() at DBReplicatorService.DBReplicatorService.RestoreDB(String sDBName, String sUserName, String sPassword, String sBackupFileName) ---> System.UnauthorizedAccessException:检索具有CLSID {10021CC1-E260-11CF-AE68-00AA004A34D5}的组件的COM类工厂由于以下错误而失败:80070005。位于DBReplicatorService.SQLDEMOScripts..ctor()的DBReplicatorService.DBReplicatorService .RestoreDB(字符串sDBName,字符串sUserName,字符串sPassword,字符串sBackupFileName)

i am using the code as follows to connect Database 我正在使用以下代码来连接数据库

Dim objBCPExport As New SQLDMO.BulkCopy2
Public objDB As SQLDMO.Database2
Dim objServer As New SQLDMO.SQLServer2

Public Function ConnectDatabaseWithRefresh(ByVal sServerName As String, ByVal sDatabaseName As String, ByVal sUserName As String, ByVal sPassword As String) As Boolean
    Dim bResult As Boolean

    Try
        objServer = New SQLDMO.SQLServer2
        objServer.EnableBcp = True
        objServer.Connect(sServerName, sUserName, sPassword)
        objDB = Nothing
        objDB = objServer.Databases.Item(sDatabaseName)
        objDB.DBOption.SelectIntoBulkCopy = True
        bResult = True
    Catch ex As Exception
        bResult = False
    End Try

    Return bResult
End Function

same code when i use in my localhost it is working fine(it contains sql server 2005), and when i use it in hosting server(it contains sql server 2008) i getting the above Error 当我在本地主机中使用相同的代码时,它工作正常(它包含sql server 2005),而当我在托管服务器中使用它(包含sql server 2008)时,出现上述错误

I getting the error in these variable initialization. 我在这些变量初始化中收到错误。

Dim objBCPExport As New SQLDMO.BulkCopy2

and connection string i am using is 我正在使用的连接字符串是

     Dim cnnNewDB As New SqlConnection("Data Source=" + pServer + "Initial Catalog="    +   pDatabase + ";Persist Security Info=True;User ID=" + pUserName + ";Password=" + pPassword)

can any one please help me to fix the problem. 谁能帮我解决问题。

Thanks, Senthil. 谢谢,森提尔。

嘿,如果您确定用户服务器名称和密码的准确性,则您的项目可能无权编写事件日志。要解决该问题,请转到\\ HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Services \\ Eventlog \\ Application \\ RestrictGuestAccess和将其值更改为(0)以重新启动

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.Web.Services.Protocols.SoapException:服务器无法处理请求-设备未准备好 - System.Web.Services.Protocols.SoapException: Server was unable to process the request -The device is not ready 使用UPS Web服务时出现System.Web.Services.Protocols.SoapException异常 - System.Web.Services.Protocols.SoapException exception in using UPS web service System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse请求失败,HTTP状态为404 - System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse request failed with HTTP status 404 有什么方法可以构造System.Web.Services.Protocols.InvokeCompletedEventArgs? - Is there any way to construct System.Web.Services.Protocols.InvokeCompletedEventArgs? .Net Intermittent System.Web.Services.Protocols.SoapHeaderException - .Net Intermittent System.Web.Services.Protocols.SoapHeaderException 使用System.Web.Services.Protocols.SoapHttpClientProtocol查看/记录原始SOAP请求/响应 - View/log raw SOAP requests/responses using System.Web.Services.Protocols.SoapHttpClientProtocol System.Web.Services.Protocols.SoapHttpClientProtocol使用什么版本的SSL / TLS? - What version of SSL/TLS does System.Web.Services.Protocols.SoapHttpClientProtocol use? 由于内部错误,服务器无法处理请求 - The server was unable to process the request due to an internal error .Net Web请求-无法连接到远程服务器 - .Net Web Request - Unable to connect to the remote server 无法通过代理服务器发出Web请求 - Unable to make web request through proxy server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM