G
gane
Hi,
I am calling a web service method in a asp.net page. This works fine if the
web services is in the local system,
but when i put in test server and reference it in asp.net page, it throws
error saying
Server was unable to process request. --> Object reference not set to an
instance of an object.
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. --> Object reference not set to an instance of an
object.
Source Error:
Line 82:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetInfo",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 83: public System.Data.DataSet GetInfo(string objectClass,
[System.Xml.Serialization.XmlArrayItemAttribute(NestingLevel=1)] object[][]
PropertyNameValue, string[] columns, bool useCached) {
Line 84: object[] results = this.Invoke("GetInfo", new object[]
{
Line 85: objectClass,
Line 86: PropertyNameValue,
Source File: c:\inetpub\wwwroot\phonebook\web
references\localhost\reference.cs Line: 84
Stack Trace:
[SoapException: Server was unable to process request. --> Object reference
not set to an instance of an object.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
Phone.localhost.Info.GetInfo(String objectClass, Object[][]
PropertyNameValue, String[] columns, Boolean useCached) in
c:\inetpub\wwwroot\phone\web references\localhost\reference.cs:84
Phone.Info.CreateDataSource() in
c:\inetpub\wwwroot\phone\default.aspx.cs:209
Phone.Info.btnSearch_ServerClick(Object sender, EventArgs e) in
c:\inetpub\wwwroot\phone\default.aspx.cs:136
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e)
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
Code:
localhost.Info info = new localhost.Info();
DataSet dsInfo = new DataSet();
object[][] obj = new object[1][];
obj[0]=new object[]{strSearchBy,strSearchFor};
string[] columns = new string[ColumnNames.Keys.Count];
columns = ColumnKey;
dsInfo = info.GetInfo("person",obj,columns,true);
I am calling a web service method in a asp.net page. This works fine if the
web services is in the local system,
but when i put in test server and reference it in asp.net page, it throws
error saying
Server was unable to process request. --> Object reference not set to an
instance of an object.
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. --> Object reference not set to an instance of an
object.
Source Error:
Line 82:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetInfo",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 83: public System.Data.DataSet GetInfo(string objectClass,
[System.Xml.Serialization.XmlArrayItemAttribute(NestingLevel=1)] object[][]
PropertyNameValue, string[] columns, bool useCached) {
Line 84: object[] results = this.Invoke("GetInfo", new object[]
{
Line 85: objectClass,
Line 86: PropertyNameValue,
Source File: c:\inetpub\wwwroot\phonebook\web
references\localhost\reference.cs Line: 84
Stack Trace:
[SoapException: Server was unable to process request. --> Object reference
not set to an instance of an object.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
Phone.localhost.Info.GetInfo(String objectClass, Object[][]
PropertyNameValue, String[] columns, Boolean useCached) in
c:\inetpub\wwwroot\phone\web references\localhost\reference.cs:84
Phone.Info.CreateDataSource() in
c:\inetpub\wwwroot\phone\default.aspx.cs:209
Phone.Info.btnSearch_ServerClick(Object sender, EventArgs e) in
c:\inetpub\wwwroot\phone\default.aspx.cs:136
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e)
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
Code:
localhost.Info info = new localhost.Info();
DataSet dsInfo = new DataSet();
object[][] obj = new object[1][];
obj[0]=new object[]{strSearchBy,strSearchFor};
string[] columns = new string[ColumnNames.Keys.Count];
columns = ColumnKey;
dsInfo = info.GetInfo("person",obj,columns,true);