Cannot access Dynamics XRM from within Event Receiver

Hello everyone
I'm struggling with an issue here and I would like to hear some advice from you. The problem is the following:
I need to do something on Dynamics CRM whenever a document is uploaded to a specific location in SharePoint. I'm using an Event receiver for this purpose and connecting to CRM via the IOrganizationService, like this:
IOrganizationService service = new OrganizationServiceProxy(serviceUri, null, credentials, null); //service uri is https//serviceUri is something like "https://crmserver/organization/XRMServices/2011/Organization.svc"
But for some reason I'm unable to execute that line successfully (looks like it times out) from within the Event receiver. However, the same exact piece of code works perfectly fine if executed from a separate console application (i.e., outside the IIS application
pool) running on the same SharePoint server...I'm confused, do I need to configure anything else on the SharePoint application pool so it let's me access the XRM service?
More info:
- It's not credentials issue, even provinding hardcoded it doesn't work
- Both SharePoint 2013 and Dynamics CRM 2013 are on premises.
- Integration between SharePoint and Dynamics CRM is done through the CRM List Component, over https, and it's working fine.This is not really important for this but it's just to tell that both servers can comunicate over https.
I would really like to get some advice on this. Thank you in advance.
Regards

Hi,
Per my understanding, there is an issue when trying to access Dynamic CRM in an Event Receiver.
As you said, the same code works in a Console Application, it means the code should be OK. To narrow down the issue, I suggest you do as follows:
1. Please debug this Event Receiver in Visual Studio to see if the Event Receiver is working, what’s more, it will give you more information about how the code works
or if there is any exception thrown during debugging;
2. Is it a Sandboxed solution? Sometimes
the limitation of a Sandboxed solution would interrupt the code execution, you can try to change it to “Farm” solution and make another test;
3. If the above steps not work for you, please trace the requests using Fiddler when the Event Receiver running, more details there would help you easier to find out
the root cause of this issue.  
Thanks 
Patrick Liang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • My Book & My Passport - cannot access recordings saved from Dish network receiver

    I was moving from another state and Dish talked me into not moving the receiver but to get the Hopper and other equipment. The Dish account I had was under my deceased common law husband's name. I bought both the My Book and My Passport and downloaded the movies and specials that my common law husband recorded on two receivers that we watched together and I want desperately to be able to watch since I have moved.  After I got moved the new Dish receivers will not recognize the moves and shows.  Dish said it is a copywrite issue because I had a different account. Dish never mentioned the fact that the account had to be the same and I have spent over $200 on these two hard drives.  What I want to know: Is there any way to be able to download these movies and tv specials that are now on these two hard drives that I cannot access.  I only want the material that I was told I could keep..I don't want to pirate shows to pass on to others. I think I deserve at least a one-time download of these shows to my current receiver as I was told by Dish Network in the very beginning.  Can anyone help me with this. Is there anyway to download them to a different device, Cloud, or anything so I can watch these movies/specials. I feel Dish should allow this onetime exemption for me but was searching for any info I can get from Western Digital if they can download them for me somehow if I can't get Dish to do it.

    Mt sympathy for your loss Mary.When you call, do it in the morning and for a supervisor in Technical support. Be firm about this point. Under copywrite law you can record the program for your own enjoyment. Tranfering the movies to a cloud will not change the personal enjoyment. If that were the case, you couldn't record it in the first place.I have gotten advice from one person and told the opposite later from another indivual. Good luck! .  

  • Cannot access Extension Manager from within Dreamweaver 2014

    I have recently upgraded to all the new programs for cc 2014. Despite advice that Extension Manager can be opened in dreamweaver from the help menu, Extension Manager does not appear in that menu.
    Extension Manager is V 7.2.1.6 And Dreamweaver 2014 is fully up to date.
    Any Clues

    This menu item has been removed.

  • I cannot ping any VIP from within the ACE or from rservers

    I cannot ping any VIP from within the ACE or from rservers.  Is this expected?  I have rservers in other serverfarms that need to be able to communicate with the VIP of other serverfarms.  Any help is greatly appreciated.

    Thanks for you reply.  here is the config.  I removed other rserver and serverfarm config that does not have to do with this issue.
    logging enable
    logging fastpath
    logging standby
    logging console 4
    logging timestamp
    logging trap 4
    logging history 4
    logging buffered 4
    logging persistent 4
    logging monitor 4
    logging device-id hostname
    logging host 172.26.254.185 udp/514
    logging host 172.26.221.25 udp/514
    access-list INBOUND line 8 extended permit ip any any
    access-list INBOUND line 16 extended permit icmp any any
    access-list INBOUND line 24 extended permit tcp any any
    access-list INBOUND line 32 extended permit udp any any
    access-list ORADB line 8 extended permit tcp any any
    probe http CITRIX
      interval 30
      passdetect interval 15
      passdetect count 6
      open 1
    probe tcp HYPERION
      port 19000
      interval 2
      faildetect 2
      passdetect interval 2
      passdetect count 2
      receive 2
      open 1
    probe icmp PROBE_SERVICE_ICMP
      interval 5
      passdetect interval 5
    probe tcp W15SPSWFET001_PROBE
      interval 5
      passdetect interval 5
      connection term forced
      open 1
    parameter-map type connection TIMEOUT
      set timeout inactivity 43200
    parameter-map type http test
      persistence-rebalance
      set header-maxparse-length 2006
    rserver host w0bairwatch003
      description MDM-SEG
      ip address 172.20.60.73
      inservice
    rserver host w0bairwatch004
      description MDM-SEG
      ip address 172.20.60.74
      inservice
    rserver host w0bairwatch005
      description MDM-DEVICE
      ip address 172.20.60.75
      inservice
    rserver host w0bairwatch006
      description MDM-DEVICE
      ip address 172.20.60.76
      inservice
    rserver host w0bhamobile001
      description Lotus Notes Traveler Server
      ip address 172.20.60.57
      inservice
    rserver host w0bhamobile002
      description Lotus Notes Traveler Server
      ip address 172.20.60.58
      inservice
    serverfarm host MDMDEVICE
      predictor leastconns
      probe PROBE_SERVICE_ICMP
      rserver w0bairwatch005
        inservice
      rserver w0bairwatch006
    serverfarm host MDMSEG
      predictor leastconns
      probe PROBE_SERVICE_ICMP
      rserver w0bairwatch003
        inservice
      rserver w0bairwatch004
        inservice
    serverfarm host TRAVLR
      predictor leastconns
      probe PROBE_SERVICE_ICMP
      rserver w0bhamobile001
        inservice
      rserver w0bhamobile002
        inservice
    class-map match-all MDMDEVICE-VIP
      2 match virtual-address 172.20.48.35 any
    class-map match-all MDMSEG-VIP
      2 match virtual-address 172.20.48.33 any
    class-map type management match-any REMOTE_ACCESS
      description Remote access traffic match
      201 match protocol ssh any
      202 match protocol telnet any
      203 match protocol icmp any
      204 match protocol https any
      205 match protocol http any
      206 match protocol xml-https any
      207 match protocol snmp any
    class-map match-all TRAVLR-VIP
      2 match virtual-address 172.20.48.34 any
    policy-map type management first-match REMOTE_MGMT_ALLOW_POLICY
      class REMOTE_ACCESS
        permit
    policy-map type loadbalance first-match MDMDEVICE
      class class-default
        serverfarm MDMDEVICE
    policy-map type loadbalance first-match MDMSEG
      class class-default
        serverfarm MDMSEG
    policy-map type loadbalance first-match TRAVLR
      class class-default
        serverfarm TRAVLR
    policy-map multi-match CLIENTS-VIPS
      class MDMDEVICE-VIP
        loadbalance vip inservice
        loadbalance policy MDMDEVICE
        loadbalance vip icmp-reply active
      class MDMSEG-VIP
        loadbalance vip inservice
        loadbalance policy MDMSEG
        loadbalance vip icmp-reply active
      class TRAVLR-VIP
        loadbalance vip inservice
        loadbalance policy TRAVLR
        loadbalance vip icmp-reply active
    interface vlan 48
      ip address 172.20.48.10 255.255.255.0
      access-group input INBOUND
      access-group output INBOUND
      service-policy input REMOTE_MGMT_ALLOW_POLICY
      service-policy input CLIENTS-VIPS
      no shutdown
    interface vlan 60
      ip address 172.20.60.10 255.255.255.0
      access-group input INBOUND
      access-group output INBOUND
      service-policy input REMOTE_MGMT_ALLOW_POLICY
      no shutdown
    ip route 0.0.0.0 0.0.0.0 172.20.48.1

  • I cannot access my mail from my ipad. I keep getting an error message "MFMessageErrorDomain error 1032". Does anyone know how to fix this?

    I cannot access my mail from my ipad. I keep getting an error message "MFMessageErrorDomain error 1032"

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom
    Tap Settings > Mail, Contacts, Calendar and delete your email account.
    Then tap Settings > Safari > and Tap Clear History and Clear Cookies and Data.
    Now tap Settings > Mail, Contacts, Calendar and re-enter your email account credentials.
    Message was edited by: Texas Mac Man

  • TS3274 Cannot access itunes store from my desktop

    Cannot access itunes store from my desktop, just received my ipad and created an id.

    How to download iTunes to your computer: http://www.apple.com/itunes/download/

  • HT5622 i cannot access my apple id within my iphone and ipad setting. not highlighted?

    i cannot access my apple id within my iphone and ipad.i go to  setting, then itunes and app store tab then my apple id seems to be greyed out.
    to start i tryed to download a song from apple store and it is just pending saying waiting in the apple store download tab ????

    You can try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.

  • Just upgraded to Lion an am discovering that I cannot send email photos from within iPhoto. Error message says bad Internet connection or server not working, when that's not the case. Never happened in Snow Leopard! Help!!!

    Just upgraded to Lion an am discovering that I cannot send email photos from within iPhoto. Error message says bad Internet connection or server not working, when that's not the case. Never happened in Snow Leopard! Help!!!

    what email service - Yahoo mail have been acting up lately
    you can try setting Mail as your email client - it resolves this pfoblem for some people
    LN

  • I have photoshop cc and a mac book pro. I cannot access my photos from photoshop. I can go to iPhoto and click edit to edit them in photoshop, but photoshop won't open them. I want to do a collage, so I need to get to more than one photo.

    I have photoshop cc and a mac book pro. I cannot access my photos from photoshop. I can go to iPhoto and click edit to edit them in photoshop, but photoshop won't open them. I want to do a collage, so I need to get to more than one photo.

    See if exporting them helps:
    Exporting From iPhoto | Apple Support Communities
    Gene

  • Accessing JAXR registry from within web service

    Hi I'm having trouble accessing the registry from within a web service running in the tomcat server.
    The service should register with the registry at startup, but in the logs from the tomcat server I can see that a JAXRException is thrown:
    javax.xml.registry.JAXRException: Unable to create ConnectionFactory: Provider com.sun.xml.registry.common.ConnectionFactoryImpl not found
         at javax.xml.registry.ConnectionFactory.newInstance(Unknown Source)
    If I run the program from outside the tomcat server as a standalone program, it registers perfectly.
    I believe the problem is that it is missing one or more jars.
    I have tried to put the jaxr-jars under shared/libs but that hasn't solved the problem.
    Has anyone an idea of what I'm doing wrong?
    Help is greatly appreciated!
    / Bo

    Hi swatdba
    I know that the build file states alle the packages that I need, and as I said, if I run my program like the regular JAXR examples, it works fine.
    The thing is, the JAXR examples are not web services on their own. They are merely Java programs that access the registry.
    In my case I am building a web service that should run in the tomcat server. When it initialises, it should register with the register, and also be able to search for other web services.
    I thought this would be possible per default, ie. the jars that the web service needs should already be available in the tomcat server, but it doesn't work. I have tried to put the jars that I've found in the build script in the folder C:\jwsdp-1.3\shared\lib, which according to the tomcat manual should be used to put jars that you want to share between your web services.

  • Is it possible to insert a url link into the itunes description tag. I want the user to be able to access my webpage from within itunes

    Hi,
    Is it possible to insert a url link into the itunes description tag in a feed. I want the user to be able to access my webpage from within itunes
    Thanks

    In the next release, we will be making adding our Measurement Studio components to existing projects much easier, but for now what you would need to do is add the support for Measurement Studio to your MFC project manually as detailed in our Knowledgbase at:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/0cb6707522e92c958625689e0052bb77?OpenDocument
    Best Regards,
    Chris Matthews
    Measurement Studio Support Manager

  • How can I access applet paramters from within javafx?

    I have a simple javafx applet from the clock tutorial, but I would like to initialise this from parameters that are specified in the <APPLET> tag, for exaple <param name="timeZone" value="America/Los_Angeles">My question is how do I access this parameter from within javafx?
    Thanks,
    Phil

    I'm looking for the same answer, if anybody knows ... ;)

  • Just downloaded Mt Lion on to my imac and now cannot access my photos from adobe cs4

    just downloaded mt lion onto my imac and now i cannot access my photos from adobe cs4

    Hope you made a Backup?
    I work with Cs 5 on mac os X.6.8
    and will wait a lttle bit to install mountain Lion.
    I´ve heard too much about technical Problems.
    I loaded MT and make a disc image from it with right mouse klick and safe it on my seperate disk.
    I will put MT on an emty disk to test it, but I can wait.
    Never change a winning Team ;-)
    I wish you fix that Problem next time, sorry I can´t help in this case.

  • Accessing java objects from within javascript

    Hello,
    Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
    Thanks in advance,
    Antana.

    What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?

  • Accessing iPad camera from within DPS application

    I have a potential client who asked me if it were possible to access the camera from within a DPS application. I have no further information at this point regarding what the reason for it will be but thought I'd shoot the question out anyway. Apparently it is possible in iOS 6 to access the camera in mobile Safari but I don't know if that is of any help.
    Thoughts? Thanks!
    :jaj

    See http://forums.adobe.com/message/5040166#5040166.
    Neil

Maybe you are looking for

  • Reg:Return purchase order

    Dear All, I have created a returns PO with ED (821) now in J1IS while capturing the excise I've maintianed different value from the purchase order since the vendor has come up with different value so I changed it in j1is and migo now while doing MIRO

  • In need of help badly (Pioneer Head Unit)

    Hi All, Recently got an AVIC-D3 head unit and a CD-I200 ipod cable with a 160 GB Ipod classic. I've been experiencing something weird - when listening to music it will eventually freeze the track title and duration display - ie :50/3:00 or whatever t

  • SetRegion does not update the region when the current one is slightly diff.

    I'm working on some iPhone MapKit code which fires off some events when the boundaries of the map change (basically some queries to an external server). There is one edge case I can't seem to solve. When users enter a new address I use setRegion to z

  • After upgrading to Maverick, 16G RAM recognised as 8G in Macbook Pro 7.1 (2010 model )

    I have upgraded to 16G RAM a year ago and I was running Mountain Lion, it was perfectly fine! After upgrading to Maverick, 16G RAM recognised as 8G in Macbook Pro 7.1 (2010 model ) . Here is the information from the "System Report" of the memory Hard

  • Add Button Group in WAD

    Hi All, I am working in BI 7.0. I am trying to create a new web template using WAD, but i am not finding a command button(push button) group in the library. Kindly help me to add a button group. Regards, Sheeba Rani