Custom Web Site Issues

Jan 5, 2011 at 3:07 PM

I am working on getting this thing fully implemented onto a Server 2003 R2 box.  The directions are for Server 2008.  I am encountering some issues with the custom application.

I have followed the steps (as best I could) to set up CustomWebSite as an application via IIS manager.  The steps and interface are quite different from 03 to 08, so I am hoping these boards will be able to provide me a solution.

 

A little background on my config:

The "server" I am using is actually a dell laptop, set up with Server 2003 R2 as the OS.  Dynamics 4.0 Rollup 10 as well as SharePoint 2007 are both installed on this server.

The following roles are set up on the server: Application Server, Domain Controller, DNS Server, DHCP Server, WINS Server.

IIS Manager 6.0 is the interface I use for IIS.

Seeing how there are two applications that require ports on this server, we have set up SharePoint to run on the default port (80), and set CRM to be working on 8080.  

There are 2 organizations on my Box, one named Dynamics, one named Grants360. The URL to access each of these is http://dynamicsshar:8080/Dynamics and http://dynamicsshar:8080/Grants360.

When I import a new organization (for "Grants360") or create a new Organization (for "Dynamics"), the report server URL I used is as follows: http://dynamicsshar/ReportServer.  There is no mention of the port, and it connects fine.

I have made the following changes to these files, as per instructed by the implementation guide.

GrantManCommon.js:

_serverUrl = 'http://dynamicsshar:8080/Grants360"

_reportserverUrl = "http://dynamicsshar:8080/ReportServer?/Grants360_MSCRM"  (NOTE: Originally I had left the port# out, but I had changed it to include the port during some testing)

Default.aspx.cs:

string url = string.Format ("http://dynamicsshar:8080/Grants360/(2)/_grid/preview.aspx?type=(0)&id=(1)"

web.config:

<add key="OrgName" value="Grants360">

All of these files have been saved.

 

Now for the part where I think I may be messing up... The CustomWebSite Application.  Keep in mind that I'm using Server 03, not 08.

I open IIS Manager, and go to web sites > Microsoft Dynamics CRM > ISV.

Right Click CustomWebSite, and click Properties.

I click Create next to the Application Name.  Application Name changes from Microsoft DYnamics CRM to CustomWebSite.

The other values on the "Directory" tab are as follows:

"The designated directory" (radio button)

Local path (greyed out, but heres the value): \ISV\CustomWebSite

The following checkboxes are checked: Script source access, Read, Directory browsing, Log visits, Index this resource.

Execute Permissions: Scripts Only

Application Pool: Default App Pool (Have also tried this same config with the app pool set to "CRMAppPool")

In the ASP.NET tab...

ASP.NET version: 2.0.50727

Virtual Path: /ISV/CustomWebSite

File Location: c:\inetpub\wwwroot\ISV\CustomWebSite\web.config (same web.config that I edited and showed above)

And in the "Edit Configuration" dialogue box, on the authentication tab authentication mode is set to Windows.

When I run MSCRM > Grants360 (note, this is the localhost URL, not the URL provided in the demo script) and open up a Grantee Form, I get the following error message in the textbox that is below DUNS Lookup (Assuming this is the customwebsite/workflow preview window)

Server Application Unavailable:

The web application you are attempting to access on this web server is currently unavailable.  Please hit the refresh button in your web browser to retry your request.

Admin Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server.  Please review this log entry to discover what caused this error to occur.  

So, I open up the Application Event log, and see two errors are thrown each time I try to access that WebApp, both error messages are simultaneous (down to the seccond, at least).

Failed to initialize the AppDomain: /LM/W3SVC/1/Root/ISV/CustomWebSite

Exception: System.IO.FileLoadException

Message: Could not load file assembly 'System.Web Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies: Access is denied.

There is a stack trace after this message, but I am running this Server 03 environment on a different laptop, so I cannot copy and paste.  If it is needed to help diagnose the problem I will add it.

The second eror:

Failed to execute the request because the App-Domain could not be created.  Error: 0x800700005 Access is denied.

 

That's about all I can offer up in terms of information that led to the problem.  I am hopeful that someone will read this, and I will have my problem resolved.  

Brian

 

Jan 5, 2011 at 3:39 PM

Checked with our developers and here is what they said to check:

Could be a permission issue; to test it, ask him to give everyone read access on the whole folder where custom web site code is located.

Please try this and let us know if you this helps or if you still have issues.

 

Jan 5, 2011 at 4:05 PM

Thanks for the quick reply!

When I go to the CustomWebSite folder (Path is C:\Inetpub\wwwroot\ISV\CustomWebSite) and right click on CustomWebSite folder, click Properties and Security, there are only 3 users(Administrator (Domain\Administrator), Administrators (Domain\Administrators) and SYSTEM), and they all have Full Control.

I go up one level and perform the same check on the ISV folder, and there are many more users.  I have set them all to Full Control, and tested, but still receiving the same error within the Dynamics window.  

The curious thing is that after I have given everyone full control, the Application Event Log does not throw another error, but I am still seeing the error message in Dynamics.  This same error message comes up if I go through IIS to the CustomWebSite and right click > browse it.

Any other ideas?

Jan 5, 2011 at 6:12 PM

Upon another hour plus of testing, I have found this to be an appropriate solution (at least for the Contact Preview window..)

 

Need to make two changes to default.aspx.cs:


What I had (after following instructions):

string url = string.Format ("http://dynamicsshar:8080/Grants360/(2)/_grid/preview.aspx?type=(0)&id=(1)"

I changed it to:

string url = string.Format ("http://dynamicsshar:8080/Grants360/_grid/preview.aspx?type=(0)&id=(1)"

 

I also needed to change the way the code was handling the authentication.  As of right now, our AD is really only set up for one user, and we are just proving the concept out.  

I commented out the following line:

request.Credentials = System.Net.CredentialCache.DefaultCredentials;

and added instead:

request.Credentials = new System.Net.NetworkCredential("Administrator", "pass@word1", "dynamicsshar.AD.local");

 

I was hopeful I could get some information about the presence of the (2) in the string URL variable.  I had found that when the (2) was in there, the URl actually went as follows:

8080/Grants360/Grants360.

It was only by chance that I deleted the (2) after receiving a 404 error in the contact preview window.

 

Also, if you could shed some light as to why my AD may not be passing the credentials using the code that was written, that would be great.  My machines login is the same as I am passing to CRM via the code I typed above.  In theory, this user/pass should be grabbed by the code that your team provided with the release.

 

Thanks!