This error comes when we have included sapnco and utills dll in your folder for sap connection with
asp.net in c# or vb.net.
so for that you do just one thing put your exe file and dll files in same folder.
and run exe files it will works.definitely.because sapnco and utills dll are external dll
so you need to add in your folder so there will be connection between your exe file and dll files.
if you will try on your machine it won't give you error but when you deploy on another machine then you
can face this issue .so better to think before do anything.somewhere you will get answer to register
your dll files in GAC but that will be different scenario.so , just add proper dll files and
in proper way sometimes it happens that connection you are trying is unreachable.
so , first of all just try to do connection and then move ahead.
this was single error but you can find another like..
Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'SAP.Middleware.Connector.RfcDestinationManager' threw an exception. ---> Syst
em.TypeInitializationException: The type initializer for 'SAP.Middleware.Connect
or.RfcConfigParameters' threw an exception. ---> System.IO.FileLoadException: Co
uld not load file or assembly 'sapnco_utils, Version=3.0.0.42, Culture=neutral,
PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. The application has
failed to start because its side-by-side configuration is incorrect. Please see
the application event log for more detail. (Exception from HRESULT: 0x800736B1)
File name: 'sapnco_utils, Version=3.0.0.42, Culture=neutral, PublicKeyToken=5043
6dca5c7f7d23' ---> System.Runtime.InteropServices.COMException (0x800736B1): The
application has failed to start because its side-by-side configuration is incor
rect. Please see the application event log for more detail. (Exception from HRES
ULT: 0x800736B1)
at SAP.Middleware.Connector.RfcConfigParameters..cctor()
--- End of inner exception stack trace ---
at SAP.Middleware.Connector.RfcConfigParameters.Initialize()
--- End of inner exception stack trace ---
at SAP.Middleware.Connector.RfcDestinationManager.RegisterDestinationConfigur
ation(IDestinationConfiguration config)
at RecruitmentSchedular.MainFunction.Main(String[] args)