on 12-30-2014 7:29 AM
Hello,
I have a problem.
I connect to rfc function with sapnco 3.0 in my web application.
First, my code is works fine.
But second time i have this error.
System.ArgumentNullException:Value cannot be null.Parameter name : key at System.Collections.Generic.Dictionary'2.
Find Entry(Tkey key) at System.Collections.Generic.Dictionary'2 TryGetValue(Tkey key,Tvalue& value) at SAPMiddleware.Connector.RfcRepositoryManager.GetRepository
(Rfcdestination destination ) at SAPMiddleware.Connector.RfcDestination.get_Repository() at WebApplication......
Error pointed out by the line below.
Hello Aysegul,
the pattern you are using is wrong. Do not register a IDestinationConfiguration within your web application code but within a more central place. A check for null when looking up a destination is simply invalid. null is returned whenever a destination is not found in the IDestinationConfiguration implementation that is registered or in the default one. In case it is not there it means it is not configured and you need to throw an exception that this destination is required for your application.
If you do the IDestionationConfiguration in a central place the exception should no longer occur.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hynek,
actually, metadata pools and application pools are completely separated. Best approach is to specify a REPOSITORY_USER and corresponding REPOSITORY_PASSWD so that metadata connections are using a user with limited premissions only. Nevertheless, you are right. Using 1 as MAX_POOL_SIZE is a problem, when using it for a destination used in a multithreaded application ...
Best regards,
Markus
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.