Answered by:
Deploy custom aspx page in CRM 4.0

Question
-
Hi,
Created a custom aspx page in which i have referred CrmService and MetadataService.
How can we deploy the aspx page to production server.
Can you please help me.
ThanksFriday, January 29, 2010 4:17 AM
Answers
-
Hi,
you need to deploy your custom aspx page under the isv directory in the MS CRM installation folder.
here are some links to help you in this.
http://nishantrana.wordpress.com/2009/05/01/custom-pages-and-relative-url%E2%80%99s-in-microsoft-dynamics-crm-4/
https://community.dynamics.com/blogs/cscrmblog/comments/5503.aspx
http://msdn.microsoft.com/en-us/library/cc905759.aspx- Proposed as answer by Muhammad Ali Khan Friday, January 29, 2010 5:35 AM
- Marked as answer by Donna EdwardsMVP Tuesday, February 2, 2010 8:28 PM
Friday, January 29, 2010 5:35 AM -
I hope you haven't hardcoded the URL?
The crmService object has the URL property. you can set this property through the code.
Insert an <appsettings> entry in your web.config file and change it and read the property in c# code.
in web.config.
<appSettings>
<add key="CRMServiceURL" value="http://servername:5555/...../crmservice.asmx" />
</appSetttings>
and then in your code you can assign it to the "URL" property of the CrmService object.
CrmService objService = new CrmService();
objService.Url = ConfigurationSettings.AppSettings["CRMServiceURL"]; /// read this entry from the web.config file.- Marked as answer by Donna EdwardsMVP Tuesday, February 2, 2010 8:28 PM
Friday, January 29, 2010 7:09 AM -
No, you don't need to update the webreference if all the structure/entities/attribues on your development and production server is same. as i said, just update this line.
objService.Url = ConfigurationSettings.AppSettings["CRMServiceURL"]; /// read this entry from the web.config file.it will start pointing to your production server.
- Proposed as answer by Muhammad Ali Khan Friday, January 29, 2010 5:52 PM
- Marked as answer by Donna EdwardsMVP Tuesday, February 2, 2010 8:28 PM
Friday, January 29, 2010 10:02 AM
All replies
-
Hi,
you need to deploy your custom aspx page under the isv directory in the MS CRM installation folder.
here are some links to help you in this.
http://nishantrana.wordpress.com/2009/05/01/custom-pages-and-relative-url%E2%80%99s-in-microsoft-dynamics-crm-4/
https://community.dynamics.com/blogs/cscrmblog/comments/5503.aspx
http://msdn.microsoft.com/en-us/library/cc905759.aspx- Proposed as answer by Muhammad Ali Khan Friday, January 29, 2010 5:35 AM
- Marked as answer by Donna EdwardsMVP Tuesday, February 2, 2010 8:28 PM
Friday, January 29, 2010 5:35 AM -
Hi,
Thanks for the reply. I have kept the custtom aspx page in the ISV directory.
The issue is i have referenced the web service of my local CRM server.
How to update it with the CRM web references in production server?
Please help.Friday, January 29, 2010 6:44 AM -
I hope you haven't hardcoded the URL?
The crmService object has the URL property. you can set this property through the code.
Insert an <appsettings> entry in your web.config file and change it and read the property in c# code.
in web.config.
<appSettings>
<add key="CRMServiceURL" value="http://servername:5555/...../crmservice.asmx" />
</appSetttings>
and then in your code you can assign it to the "URL" property of the CrmService object.
CrmService objService = new CrmService();
objService.Url = ConfigurationSettings.AppSettings["CRMServiceURL"]; /// read this entry from the web.config file.- Marked as answer by Donna EdwardsMVP Tuesday, February 2, 2010 8:28 PM
Friday, January 29, 2010 7:09 AM -
Hi,
I have not hardcoded the URL. I have placed it in config file.
But by changing only the URL in the config file, whether the web references get updated?
Whether i have to add the web references in production server via Visual Studio? Or any other
way to do this?
Thanks.Friday, January 29, 2010 7:21 AM -
No, you don't need to update the webreference if all the structure/entities/attribues on your development and production server is same. as i said, just update this line.
objService.Url = ConfigurationSettings.AppSettings["CRMServiceURL"]; /// read this entry from the web.config file.it will start pointing to your production server.
- Proposed as answer by Muhammad Ali Khan Friday, January 29, 2010 5:52 PM
- Marked as answer by Donna EdwardsMVP Tuesday, February 2, 2010 8:28 PM
Friday, January 29, 2010 10:02 AM -
Thanks...Friday, January 29, 2010 11:36 AM