Connection Info

Feb 4, 2011 at 5:06 PM

I am trying to use this utility.  I cannot get GUIDs to display so I assume the connection information is not correct.  I am assuming there is no button to validate the connection, that once you tab through the various fields if all is accurate it will connect and populate the GUID list.  Here is what I have in the various fields:

  • Server = SQL Server name
  • Port = 1433
  • Organization = database name
  • Username = windows user (windows authentication)
  • Password = windows password
  • Domain = Windows domain name for network

I also tried sa with no luck.  Thanks in advance for help and for a great tool to get these docs out of CRM.

Chris

Developer
Feb 8, 2011 at 2:28 AM
Edited Feb 8, 2011 at 2:37 AM

Hello Chris,

For this first version of the Utility, you have to get the GUID from the SQL Database "Annotation" Entity Directly by running a Query Similar to this in Microsoft SQL Management as a Query:

select top 50 AnnotationId from annotation where IsDocument = 1;

You will then copy and paste the result into the Utility to download the files in question. I hope this makes sense. Another issue I notice is that you should be connecting to the CRM Server, NOT the SQL Server, as the utility uses the CRM 4.0 Webservice which is only available on the CRM Server itself. Also, the organization is the abbreviation before the "_MSCRM" database name, which is normally in the format [ORGANIZATION]_MSCRM. Lastly, the Port will be the Port you use to connect to CRM, which is by default Port 80.

Thanks,

Pete

Note: For future versions of this Utility we will most likely add support for download based on Object Name, to make things easier for users. But in the meantime please use the above method.

Feb 8, 2011 at 2:49 PM

Thanks Pete, I was able to get the program to export the attachments to the directory.  Great Utility!  It turns out that if there is filename duplication, there is no error trapping or notice given to the user.  Notice to the user would be helpful or a strategy to append to the filename to make them unique. 

What I did was add 'Filename' to your SQL query above and paste the results into a spreadsheet:

select AnnotationId,FileName from annotation where IsDocument = 1

Then I sorted based on filename, added a formula to isolate the duplicates so I could deal with them in batches by using different folders. 

Thanks again for you effort.  This was a huge help getting things out of the 'vault'

Chris

Developer
Feb 8, 2011 at 2:58 PM

Glad the utility was useful to you Chris. You are correct, by default the second file overwrites the first with the existing version. I will add your suggestion to Issue Tracker to detect duplicates in future versions. 

 

Thanks,

Pete

Apr 15, 2011 at 7:02 PM

Pete, kudos on the utility, it is very useful and it works.

What is the purpose of the area below GUID (One Per Line), is it for logging?

Thanks,

Alan.

Developer
Apr 15, 2011 at 7:39 PM

Hello Alan,

You are very welcome. Glad you found the Utility useful.

The area below GUID is to display error messages that may occur while downloading the individual files from CRM.

Thanks,

Pete

Apr 15, 2011 at 10:58 PM

Pete,

Does utility support mime attachment, I tried using ActivityMimeAttachmentId from ActivityMimeAttachment as GUID and receive an error?

Thanks,

Alan.

Developer
Apr 15, 2011 at 11:51 PM

No, the current version of the Utility only accepts AnnotationId for GUID, not ActivityMimeAttachmentId.

Thanks,

Pete

Apr 16, 2011 at 12:06 AM

Thanks for the quick reply.

Is there another solution or approach to downloading mime attachments?

Alan.

Developer
Apr 17, 2011 at 4:36 AM

Hello Alan,

Unfortunately you will not be able to retrieve the Activity Mime Attachment using the above Method through the CRM Web Service. If you do try to, you will get the following error:

<error>
    <code>0x80041102</code>
    <description>The entity with a name = 'ActivityMimeAttachment' was not found in the MetadataCache.</description>
    <type>Platform</type>
</error>

The only way you can download those types of Attachment is do create a direct SQL Connection Get the fields "FileName" and "Body" from Table "ActivityMimeAttachment" based on "ActivityMimeAttachmentId":

SELECT [FileName],[Body] FROM ActivityMimeAttachment WHERE [ActivityMimeAttachmentId]='Your Activity Mime Attachment ID Here';

Once you have those values, you can convert the "Body" string value using "Convert.FromBase64String("YOUR ATTACHMENT STRING HERE")". 

Hope this helps.

Pete

Apr 18, 2011 at 8:26 PM

Hi Pete,

I appreciate the information. I will look into how to convert from base64.

Thanks,

Alan.

May 27, 2011 at 2:48 PM
Edited May 27, 2011 at 3:27 PM

Pete,

Having a little issue with the app, getting an unhandled exception,  I tried running this from my windows 7(64 bit) client and windows XP(32).

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at CRMAttachmentDownloadApp.Form1.btnDownload_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CRMAttachmentDownloadApp
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/a05290/Desktop/CRMAttachmentDownloadApp.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

 

Developer
Jun 7, 2011 at 6:56 AM

Hello David,

This issue has been fixed in Version 1.2.0.0. The problem was with a faulty shortcut in the Start Menu.

Pete

Jun 7, 2011 at 3:10 PM

Pete,

Quick question when pasting the GUID is there a limit on how many, I just tried to past about 3817 and seem like only took 826 of them, is there a size limit on the input screen.

Dave

From: psoheil [email removed]
Sent: Tuesday, June 07, 2011 12:56 AM
To: Macintire, David
Subject: Re: Connection Info [crmattachdownload:244676]

From: psoheil

Hello David,

This issue has been fixed in Version 1.2.0.0. The problem was with a faulty shortcut in the Start Menu.

Pete

Outgoing messages, along with any attachments, are scanned for viruses prior to sending.


NOTICE-- This email may contain confidential and privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and delete all copies.

Developer
Jun 7, 2011 at 3:44 PM
Hi Dave,

We have not put any limitations in terms of how many records you can download at a time in place. The limit is only determined by your computer's hardware.

Thanks,
Pete


From: [email removed]
To: [email removed]
Date: Tue, 7 Jun 2011 07:10:29 -0700
Subject: Re: Connection Info [crmattachdownload:244676]

From: dmacintire
Pete,

Quick question when pasting the GUID is there a limit on how many, I just tried to past about 3817 and seem like only took 826 of them, is there a size limit on the input screen.

Dave

From: psoheil [email removed]
Sent: Tuesday, June 07, 2011 12:56 AM
To: Macintire, David
Subject: Re: Connection Info [crmattachdownload:244676]


From: psoheil
Hello David,
This issue has been fixed in Version 1.2.0.0. The problem was with a faulty shortcut in the Start Menu.
Pete
Outgoing messages, along with any attachments, are scanned for viruses prior to sending.

NOTICE-- This email may contain confidential and privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and delete all copies.
Read the full discussion online.
To add a post to this discussion, reply to this email (crmattachdownload@discussions.codeplex.com)
To start a new discussion for this project, email crmattachdownload@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Jun 7, 2011 at 3:45 PM

Ok, but I can only paste about 850 GUID into the app, so I’m batching them.

From: psoheil [email removed]
Sent: Tuesday, June 07, 2011 9:44 AM
To: Macintire, David
Subject: Re: Connection Info [crmattachdownload:244676]

From: psoheil

Hi Dave,

We have not put any limitations in terms of how many records you can download at a time in place. The limit is only determined by your computer's hardware.

Thanks,
Pete


From: [email removed]
To: [email removed]
Date: Tue, 7 Jun 2011 07:10:29 -0700
Subject: Re: Connection Info [crmattachdownload:244676]

From: dmacintire

Pete,

Quick question when pasting the GUID is there a limit on how many, I just tried to past about 3817 and seem like only took 826 of them, is there a size limit on the input screen.

Dave

From: psoheil [email removed]
Sent: Tuesday, June 07, 2011 12:56 AM
To: Macintire, David
Subject: Re: Connection Info [crmattachdownload:244676]


From: psoheil

Hello David,
This issue has been fixed in Version 1.2.0.0. The problem was with a faulty shortcut in the Start Menu.
Pete

Outgoing messages, along with any attachments, are scanned for viruses prior to sending.


NOTICE-- This email may contain confidential and privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and delete all copies.

Read the full discussion online.
To add a post to this discussion, reply to this email (crmattachdownload@discussions.codeplex.com)
To start a new discussion for this project, email crmattachdownload@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Outgoing messages, along with any attachments, are scanned for viruses prior to sending.


NOTICE-- This email may contain confidential and privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and delete all copies.

Developer
Jun 7, 2011 at 4:12 PM

I just realized, the default maximum number of characters allowed in text boxes in .NET by default is 32767 characters. So that may be the limit you are hitting.

Doing the downloads in batches will solve the issue. I will open a ticket for this issue for future release.

Pete

May 21, 2014 at 9:57 PM
I know this is an old thread but I'm trying this tool for hte first time on a client and they are having issues getting it to work. See error message below.

Unhandled exception has occurred in your application...

Could not load file or assembly 'Microsoft.Crm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest destination does not match the assembly reference.

What does this mean and how do I fix it?
Developer
May 21, 2014 at 10:05 PM
Is this a 32 bit machine or 64 bit that you are running it on? Can you also confirm that the two dlls (Microsoft.Crm.SDK.dll and proxy one) are in the installation directory?

Thanks


May 21, 2014 at 10:44 PM
Thanks! Checking with client to confirm which version download I sent and whether the dlls are there, and what version machine they're on (32 or 64 bit).
May 22, 2014 at 3:00 AM
Here's the error message they're getting now that they installed the latest version (2.0) -- they were on 1.2 with the original message. They are on 64-bit and yes the DLLs are in the folder.
Kendra Von Achen
Force Optimized
(973) 876-3729
May 22, 2014 at 4:43 PM
Image didn't come through. Here's a way to access it -- https://www.dropbox.com/s/3ph7fmzl1u60v61/image002.png
Developer
May 22, 2014 at 5:23 PM
Hello Kendra,

The error in your screenshot means that the user you are trying to use to the CRM Webservice does not have access permission. To fix go to the CRM Admin and give the user access permission to the web service.

Thanks,
Pete
May 22, 2014 at 5:26 PM
Edited May 22, 2014 at 7:47 PM
Thanks Pete! Relaying this to the client. Hopefully this does the trick.
May 22, 2014 at 7:47 PM
Pete - could you walk me through on the phone where to find this setting? Is it on the server or within MS CRM when you log in?