on 2008 Nov 14 7:41 AM
Hello,
I've downloaded the B1WS and follow all the configuration instruction. But after running the ASPNET_Sample and try to login to my SAP B1, i got this error
"Client found response content type of 'text/html', but expected 'text/xml'. The request failed with the error message: -- "
"Server Application Error
The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance. --.!"
I have check the DIServer log file, but its not helpful. Anybody can give me the idea of what went wrong??
Request clarification before answering.
Hello Hafiz,
Could you check B1WSHander under <<C:\Program Files\SAP\SAP Business One Web Services\B1WS\App_Code\B1WSHandler.cs>>?
Do you find the following content-type of response that should be consistent with Request?
Response.AppendHeader("Content-Type", Request.ContentType);
if not, please use the attached to replace it.
But the way, actually you can make a break point under
public void ProcessRequest(HttpContext context)
to check what is wrong there.
Did you download it from SDN by yourself?I think the one from SDN should work fine. Thanks.
Regards
-Yatsea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've checked the B1WSHandler.cs, its the same with ur post. I never changed the code.
Do i have to make change to any code before i can use the sample??
I had try to make a new asp.net page and added the web reference from the B1WS, but still got the same error.. "Client found response content type of 'text/html', but expected 'text/xml'"
Hello Yatsea,
Still no luck regarding the error. I wonder if my IIS got problem, or maybe i got the incorrect setting.
In IIS, i create a virtual directory pointing to the ASPNET sample. And when i browse it, it cannot be displayed and it give out error 500.
before this i only run the sample using the VS2005 development environment. The sample site got no problem displaying in the development environment.
Is it my IIS??
Yatsea, what does this means??
Notes on the sample code
1. One very important point not to forget when using B1WS is to fill the MsgHeader class with the relevant information regarding the DI Server session ID you are connected to and the name of the service you want to access. Each service has a MsgHeaderValue property to be set with the MsgHeader class.
2. Per each object property with a type different of string an associated Boolean property with the same name but finishing with u201CSpecifiedu201D is automatically created by .NET environment. You are forced to set this property value to u201Ctrueu201D if you want the associated property to be correctly set in the DI Server SOAP message automatically formatted.
Hello Hafiz,
Have you try to update B1HttpHanlder.cs as my last post.
In this case, you may need to update B1HttpHanlder.cs
<<C:\Program Files\SAP\SAP Business One Web Services\B1WS\App_Code\B1WSHandler.cs>>
Response.AppendHeader("Content-Type", "text/xml");
instead of
Response.AppendHeader("Content-Type", Request.ContentType);
Let me know, after that whether you can run the B1WS sample or not. Thanks.
<<C:\Program Files\SAP\SAP Business One Web Services\Samples\WindowsSample>>
Kind Regards
-Yatsea
Hello Yatsea.
Yes, i already try that one. And i try to run both of the sample, the ASPNET sample and windows sample. Both give out result error "response text/html, expected text/xml".
Nevermind, i'll proceed with DI Server then. I'll KIV this and try to run this later on a new machine.
Thanks for your help.
Hye Yatsea
I'll follow your advice and try to look into details of what went wrong.
by the way, as far as i'm concern, i downloaded the B1WS installer from the SDN.
Thanks..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anyone??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
39 | |
8 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.