on 12-12-2011 10:01 AM
After Browsing this Forum - if found a couple of threads according but mostly on other contextes without answers. So i try to start a new one with the hope to get help.
I'm trying to start Developing Web-Service to communicate between Sharpoint 2010, Infopath 2010 and SAP.
There for i decided to use the SAP .NET Connector in Version 3.0.2 (64 Bit) and Visual Studio Professional 2010 SP1.
I already developed successfully a Class for my SAP Connections which works well in Console and Forms applikations. Try get it run with an ASP.NET Web Service - it fails, so i tried to start from the Beginning.
I created a Web Service on .NET 4 Framework (64 bit Compile env.), included SAPNCO.DLL and SAPNCO_UTIL.DLL compiled and testet.
The VS Internal Browser failed on:
>Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format.
So i could guess the dependencys to: IPHLPAPI.DLL, libicudecnumber.dll and rscp4n.dll, and copied them to my Projects Output bin folder. That worked so far. And i run into the next issue:
>Could not load file or assembly 'rscp4n' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I found some post about dependencies to C++ Runtime Env. So i updated the C++ Runtime from MS. But no effects ?
Any Idea's what to do, to get a sample run ?
Try IIS settings of App pool:
App pool: ASP.net v4.0 Integrated and in Advanced settings under General --> Enable 32-bit applications to True. Restart app pool, browse the app.
Issue is solved for me in 64 bit .Net4.0 environment.
Regards,
Suji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gerhard,
I recommend you to have a look at the fusion logs during startup of your application. It gives you enough information on the failing module.
Also, a better but more cumbersome approach is using windbg to attach to the process and get the loader hooks. That way, you can find the exact reason of the module load failure.
Best Regards,
Salih
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gerard, off course you will have a good reason to use the SAP dot net connector with Visual Studio, but you could also consider calling SAP directly from Sharepoint. Every RFC or BAPI in SAP could be exposed to the outside world as a web service. This web service can be called directly from Infopath or from Sharepoint. We recently create a sales order entry form using this technique.
Regards Jack
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you're using IIS 7.0, make sure to add the <system.webServer> tag, even if it's empty.
<system.webServer>
<defaultDocument>
<files>
<add value="Service1.asmx" />
</files>
</defaultDocument>
<httpProtocol>
<customHeaders>
<add name="Developped-By" value="NicolasPeterson" />
</customHeaders>
</httpProtocol>
</system.webServer>
Also, make sure your WebService is converted to "WebApplication" (function in VS2010 : Right-Click on your project, Convert).
In IIS, set your DefaultApplicationPool to .NET Framework 4.0 (by Default, 2.0).
Try to remove your references from your project (right-click, remove) and re-add them (right-click, add references).
My WebService (*.asmx) works fine and all de *.dll files are located in the 'bin' folder (the folder is in the same path as my asmx file)...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem. Your post has been up here for almost more than a month. Had you been able to get the answer yet? Would you mind to share what you had found so far?
I personally think no one ever use .Net connect yet, or if they do, their environment is not up todate, especially SAP QA department hardware and software. If they do, they would've already found the issue.
Thanks.
Edited by: Frank Do on Feb 6, 2012 5:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am trying to connect SAP .Net3.0 connector in internal website. I am getting error "Could not load file or assembly 'rscp4n' or one of its dependencies. An attempt was made to load a program with an incorrect format."
If I use the same references in .Net win forms application or class library --> no error coming.
But once I use them in .Net web application I see the error.
Please reply back if you have any solution for this.
Thanks
Suji
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.