Problems Getting Started

Jul 28, 2010 at 1:07 AM

I am having an issue deploying this accelerator.  I am stuck on the websitecopy.exe step.

Error I am getting is:

Unhandled Exception: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 124.
   at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionSt
ring, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String&
 keyname, String& keyvalue)
   at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable,
 String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstK
ey)
   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hash
table synonyms, Boolean useOdbcRules)
   at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String v
alue)
   at Microsoft.Xrm.Client.Collections.Generic.ConnectionStringDictionary.ForEac
h(String connectionString, Action`2 add)
   at Microsoft.Xrm.Client.Collections.Generic.ConnectionStringDictionary.Parse(
String connectionString)
   at WebsiteCopy.Copier.Copy(String[] args)
   at WebsiteCopy.Program.Main(String[] args)

----

I am not sure what to try next.  I have tried authenticating against the IFD and internal, w/o username, w/ username..

I am running the latest rollup update 10 on SQL 2008.  Running this from my x64 Windows 7 workstation to a 2008 x64 Server.

Any assistance is appreciated!

Jul 28, 2010 at 2:24 AM

I ended up getting it going using the following:

I set the .cmd file to integrated authentication, copied everything to the server, adjusted the url to http://localhost:port/orgname -- logged into the server as administrator and it imported successfully.  Guess this needs to be done locally from the server??

Hope this helps someone else in the same situaiton!

Jul 28, 2010 at 2:46 AM

The error indicates that you had something wrong with the connection string when you tried it from your workstation.  The utility can easily run from your workstation, but you have to have the parameters given in the connection string and the security for your CRM set up properly.  Glad you have it working now.

Shan McArthur
www.shanmcarthur.net

Jul 28, 2010 at 2:54 AM

Oh okay- I must not have tried the right combo from my workstation yet then ;)  I do appreciate the reply!

I am actually having an issue now with a server 500 error.  May come from the issue of trying to rebuild the project from Visual Studio 2008 C# Express Edition?  When I try to open the project file, I get a project not supported error.. 

Jul 28, 2010 at 2:58 AM

Hmm.  I have not tried express edition yet, so I don't know.  Do you have .Net 3.5 SP1 installed on your development workstation?  What is the error?

Shan

Jul 28, 2010 at 3:03 AM

Yes, .Net 3.5 is installed on the dev server.  The error is:

Event code: 3005

Event message: An unhandled exception has occurred.

Event time: 7/27/2010 10:51:46 PM

Event time (UTC): 7/28/2010 2:51:46 AM

Event ID: c0353c85a5374c9080b0985d882c1e53

Event sequence: 3

Event occurrence: 2

Event detail code: 0

 

Application information:

Application domain: /LM/W3SVC/3/ROOT-5-12924758104102

Trust level: Full

Application Virtual Path: /

Application Path: c:\inetpub\portalsite\

Machine name: <servername>

 

Process information:

Process ID: 3168

Process name: w3wp.exe

Account name: NT AUTHORITY\NETWORK SERVICE

 

Exception information:

Exception type: SoapException

Exception message: Server was unable to process request.

 

Request information:

Request URL: http://portalsite.domain.com/

Request path: /

User host address: 192.168.1.101

User:

Is authenticated: False

Authentication Type:

Thread account name: NT AUTHORITY\NETWORK SERVICE

 

Thread information:

Thread ID: 6

Thread account name: NT AUTHORITY\NETWORK SERVICE

Is impersonating: False

Stack trace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at Microsoft.Crm.SdkTypeProxy.CrmService.Execute(Request Request)

at Microsoft.Xrm.Client.Services.CrmServiceWrapper.Execute(Object request)

at Microsoft.Xrm.Client.Services.CachedOrganizationService.InnerExecute(Request request)

at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.InnerExecute[TRequest,TResponse,TResult](TRequest query, Func`2 execute, Func`2 selector)

at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.<>c__DisplayClass8`3.<LookupAndInsert>b__6(String _)

at Microsoft.Xrm.Client.Threading.MutexExtensions.<>c__DisplayClass5`1.<Get>b__4(String k)

at Microsoft.Xrm.Client.Threading.MutexExtensions.<>c__DisplayClass2`1.<Get>b__0(Mutex _)

at Microsoft.Xrm.Client.Threading.MutexExtensions.Lock(String key, Int32 millisecondsTimeout, Action`1 action)

at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 millisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService)

at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Int32 millisecondsTimeout, Func`2 loadFromCache, Func`2 loadFromService, Action`2 addToCache)

at Microsoft.Xrm.Client.Threading.MutexExtensions.Get[T](String key, Func`2 loadFromCache, Func`2 loadFromService, Action`2 addToCache)

at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.LookupAndInsert[TRequest,TResponse,TResult](TRequest query, Func`2 execute, Func`2 selector, String selectorCacheKey)

at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.Get[TRequest,TResponse,TResult](TRequest query, Func`2 execute, Func`2 selector, String selectorCacheKey)

at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.InnerExecute[TRequest,TResponse,TResult](TRequest request, Func`2 execute, Func`2 selector, String selectorCacheKey)

at Microsoft.Xrm.Client.Services.InMemoryCrmCacheProvider.Execute[T](Request request, Func`2 execute, Func`2 selector, String selectorCacheKey)

at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute[T](Request request, Func`5 execute, Func`2 selector, String selectorCacheKey)

at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute[T](Request request, Func`2 selector, String selectorCacheKey)

at Microsoft.Xrm.Client.Services.CachedOrganizationService.Execute[T](Request request)

at Microsoft.Xrm.Client.Services.CachedOrganizationService.RetrieveMultiple(QueryBase query)

at Microsoft.Xrm.Client.Linq.CrmQueryProvider.<>c__DisplayClassc.<Execute>b__b(IOrganizationService service)

at Microsoft.Xrm.Client.Services.IOrganizationServiceExtensions.Using[T](Func`1 create, Func`2 action)

 

 

Custom event details:

Jul 28, 2010 at 3:29 PM

This looks like the website cannot connect to the CRM server.  Since you had problems with your previous connection strings, I would start from there.  I will guarantee that the portal works, but it does require that you have the infrastructure set up, and point the portal at the CRM server with the appropriate connection string.  The error you posted demonstrates that the portal is getting a SOAP error trying to talk to the CRM web services - this indicates that the connection between the portal and the CRM is not functioning properly.

What are you using for a connection string?

Shan

Jul 28, 2010 at 4:18 PM

My connection string is as follows:

<add name="Xrm" connectionString="Authentication Type=AD; Server=http://<servername.domain.tld>:5555/OrgName; User ID=Domain\webuseraccount; Password=webuserpassword;" />

I have also registered the APP w/ Windows Live per the instructions on the deployment guide.  These values are valid and correct, verified in iis7.  I had a previous issue with the password as it had a reserved character in it, but I adjusted that with still no  luck.

I have also verified the connection information is valid and working by accessing the deployment locally with the given information in the connection string...  I really am lost at this point :(

is it necessary to rebuild the project?

Jul 28, 2010 at 5:00 PM

Are there or would there be any issues with configuring this portal as another website on the same CRM server?  That is what I have done, as we do not carry a heavy load on CRM as of yet..

Jul 28, 2010 at 5:13 PM

You can host both the CRM and your portal on the same server.  Just make sure they are using different application pools.

On your issue about the portal not connecting, log into the CRM server (where you are hosting your site), and use the CrmSvcUtil and give it the exact same connection string name as you provided in your web.config.  I would expect that the tool will fail in the exact same way.  Once you tweak your connection string to work, you will find the connection string will also function in the portal site.

Shan

Jul 28, 2010 at 5:14 PM

Again, thank you for the assistance, it is deeply appreciated!  I will work that angle and report back..

Thanks again,

Austin

Jul 28, 2010 at 7:48 PM

It appears the CRM user I was configuring may have had a permissions issue.  when I used a system administrator account I was able to connect successfully.  I used the suggested role of CSR for this user in CRM, however using this account to connect was resulting in error.  I really do not want to keep a system administrator role for the webuser account- so any feedback there is deeply appreciated.

The next error I ran into was the name of the website after I was able to get a successful connection.  I had deviated from the documentation in name for site to be more applicable to our deployment.  I had to change this value in the web.config file which gave me ultimate success in deploying the portal.  For reference the change was made on the following line:

<appSettings>

 <add key="crm-site" value="<site name in iis>" />

<add key="Microsoft.xem.portal.web.cmsservicebaseuri" value="/Services/cms.svc" />

</appsettings>

Any direction on the user role for the webuser is appreciated.

thank you,

Austin

Jul 28, 2010 at 10:44 PM

I found another thread that talked about the permissions issue- http://customerportal.codeplex.com/Thread/View.aspx?ThreadId=218588 - I made the same adjustment and tried my webuser using the crmsvcutil and it worked as well!  However, with modifying the connection string to match what worked on the crmsvcutil, I received the 500 error again..  I am not sure why one works and the other doesnt when they are exactly alike?  It appears to be the same error I was previously getting too.  I am going to adjust the permissions a tad more and see if I can make any progress.

I am still looking through previous discussions for this awesome add-in too- but I have not found anything that expresses alternate authentication to LiveID.  I would really prefer not to use windows live at all, honestly.  Is this somewhere I am overlooking?

Jul 28, 2010 at 11:13 PM

The minimum role permissions required for the websitecopy utility and the web proxy user account have not been well documented yet.

The portal uses ASP.NET best practices, and part of that is the use of standard membership and role providers.  You can swap out Live ID for any membership provider.  I have written a blog post on how to do this:  http://www.shanmcarthur.net/crm/developers-corner/customer-portal-modifications-for-demo-vpc-without-internet-connectivity

Another thing you may want to be aware of is that the commercial version of the portal framework has a CRM contact membership provider as well as a number of advanced CMS and portal features that you might also want to check out.  Here is a page that highlights the differences: http://www.adxstudio.com/adxstudio-xrm/comparison

Shan

Jul 28, 2010 at 11:46 PM
Edited Jul 29, 2010 at 5:41 AM

Excellent!  I will check out the commercial product and read up on the links you provided.

 

Thanks again for all the help- I am VERY excited to get this up and running!!

 

 

 

Jul 29, 2010 at 6:26 AM

I got one more before I start working this security model stuff-

It appears the data is not "instant" when it is changed in CRM and the user is logged in.  Is there a way to decrease the refresh time from the portal to CRM?  I want to provide as real time data as possible from CRM to the portal.

Thank you,

Austin

Jul 29, 2010 at 11:03 AM

For the benefit of other users and making it easy for people to find information that pertains to them, you should really consider opening new discussions for each topic.

The 'refresh time' you are talking about is really related to caching.  The portal reads from CRM and caches the results, then on subsequent pages, it uses the cached results until they time out or are invalidated in the portal.  There is a cache invalidation feature in the portal, and we have workflow assemblies that can be deployed to CRM to invalidate the portal cache when CRM data changes, but these unfortunately did not get shipped with the first version.  We are considering whether to release them as part of the next update, or to release the source code for you to compile and deploy on your own.  Stay tuned for that.  As for cache configurability, it can be configured, but it is not documented and for some configurations requires some new code.  Again, we will be addressing this in the next update to make it real easy to configure the cache and to also provide a cacheless implementation that you can use for time-sensitive queries that you do not want cached.

In the meantime, please see the portal documentation and set up a toolbar icon with the script that can invalidate the cache on your portal from your browser.

Shan