web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to put app.config file with plugin.

(0) ShareShare
ReportReport
Posted on by 6

Hello All,

I have two class library project .

1. where plugin code is written.

2.where helper classes and one .asmx web reference added.

After building the code i need to register using plugin registration tool.

can anybody help me doing this.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    So the first issue is related to 2 assemblies. To register it you should use ILmerge to put content of both libraries into one - nicknow.net/dynamics-crm-ilmerge-dll-plugin

    Why do you need app.config? If you have some settings inside I'm afraid you will have to find other way to pass parameters inside plugin code (for example through some configuration entity or through Plugin Confing or Plugin Secure Config).

  • EmployeeOcta Profile Picture
    6 on at

    Hello Andrii,

    Actually we are using third party web service reference in the second library.

    Now when we are adding service reference into the class library the endpoints are getting created within the app.config file.

    Although we are passing the web service url from plugin unsecure configuration

    but the plugin is throwing an error of "Endpoint not found".

    the service we are calling if it's used using console application then it's working but while from the plugin it's not working.

    what could be the root cause that it's throwing this error.??

  • EmployeeOcta Profile Picture
    6 on at

    System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at sub.example.com/sample.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond  (ip address.)

    This is the specific error we are getting from within the plugin.

  • Suggested answer
    Alagunellaikumar Profile Picture
    6,212 on at

    Hi

    You have to dynamically create end point address. Please refer below URL

    msdn.microsoft.com/.../ff647110.aspx

    msdn.microsoft.com/.../ms404972(v=vs.110).aspx

    www.codeproject.com/.../dynamically-configure-web-service-endpoint-for-cli

  • EmployeeOcta Profile Picture
    6 on at

    Hello Alagu,

    when i am debugging the code by attaching the process using the visual studio we do not get the Endpoint Not found exception but when plugin is running from within the CRM then only the Endpoint Not found exception is coming.

    why ??

    can anybody.

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at
  • Suggested answer
    Alagunellaikumar Profile Picture
    6,212 on at

    Hi

    Because when you run from visual studio your app.config is there so it takes data from appconfig. WHen you register the dll in CRM you are not registering app.config.

    For that only I told use Endpoint address class to build dynamical endpoint instead of referring from app.config file

  • EmployeeOcta Profile Picture
    6 on at

    Hello Alagu,

    I understand the point you are talking about.

    I am passing the url from outside i.e. from the plugin unsecure configuration .

    and also dynamically making the endpoint.

    One more thing the same code is working in DEV environment but it's not working on the

    QC environment.

  • EmployeeOcta Profile Picture
    6 on at

    Hello Guys,

    I come to understand this issue is because of the internet proxy.

    can anybody let me know how to bypass the proxy from the CRM server for plugin.

    Do i need to prefer machine.config file or web.config file of CRM .

    any pointer will be helpfull.

  • Verified answer
    EmployeeOcta Profile Picture
    6 on at

    Hey Guys,

    The issue is resolved .i have changed the web.config file with bypassing the proxy.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans