Lỗi: Không thể tạo lớp tạm thời (kết quả = 1) ... Khi gọi phương thức trên dịch vụ web. Tôi đang sử dụng VS 2008 C# ASP.NET 3.5. Tôi đang gọi một dịch vụ web từ xa đến ứng dụng của mình.Lỗi: Không thể tạo lớp tạm thời (kết quả = 1) ... Khi gọi phương thức trên dịch vụ web
Server Error in '/' Application.
Server was unable to process request. ---> Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\6sbkwt2d.0.cs' could not be found
error CS2008: No inputs specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\6sbkwt2d.0.cs' could not be found
error CS2008: No inputs specified
Source Error:
Line 775: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckLogin", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 776: public System.Data.DataSet CheckLogin(string uname, string pswd) {
Line 777: object[] results = this.Invoke("CheckLogin", new object[] {
Line 778: uname,
Line 779: pswd});
Source File: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\14127ae4\96323535\App_WebReferences.u9ldrmk1.0.cs Line: 777
Bạn có thể vui lòng cho chúng tôi biết một số mã không? Bạn gọi dịch vụ web như thế nào? Giao diện webservices là gì? Bạn cũng có mã cho chức năng webservice mà bạn đang gọi? –
bản sao có thể có của [System.InvalidOperationException: Không thể tạo một lớp tạm thời (kết quả = 1)] (http://stackoverflow.com/questions/657993/system-invalidoperationexception-unable-to-generate-a-temporary-class- result-1) – V4Vendetta
@Wouter Mã gọi điện thoại web của tôi như sau: return objWEB.CheckLogin (tên người dùng, mật khẩu); Tôi đã bao gồm không gian tên tha bằng cách sử dụng WebReference; và tạo đối tượng webservice (objWEB) WebReference.Service objWEB = new WebReference.Service(); –