Customizing Default IE Test Page for ASP.NET web service


When we create ASP.NET web service from visual studio and run the web service a test page opens up in which we can test our web service.

We can easily customize that web service test page. The name of the page is DefaultWsdlHelpGenerator.aspx we can found it in the following directory

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\ for ASP.NET 2.0.

Open the page in Visual Studio

First and foremost we would find the following things that could be configured

// set this to true if you want to see a POST test form instead of a GET test form
bool showPost = true;

// set this to true if you want to see the raw XML as outputted from the XmlWriter (useful for debugging)
bool dontFilterXml = false;

// set this higher or lower to adjust the depth into your object graph of the sample messages
int maxObjectGraphDepth = 4;

// set this higher or lower to adjust the number of array items in sample messages
int maxArraySize = 2;

// set this to true to see debug output in sample messages
bool debug = false;

To customize the UI good information is provided over here

Customizing Web Service Test Page’s UI Design

By Default the web service can be tested using Http Get (default) and Http Post, but if we want to test using the SOAP we can make use of the information provided in the following link

Testing Web Service with SOAP


Error: Backup failed for Object Shared Search Index failed in event OnBackupComplete

Hi I got this error when i was taking the backup of the farm

stsadm.exe -o backup -directory \\d-4526\MossFarmBackup -backupmethod full

The solution for this is to

Go to Central Administration Page.

Click on your Shared Service

Then on Search Settings there Reset all crawled content

This should solve the problem


“A SharePoint database named ‘….. ‘already exists. You must supply another name for the new database.” – Using Sql Server BackUp and Restore of Content Database.

To create a new web application which will use an existing content database we need to do the following.

Open Sql Server Management Studio

To take back up of the database in my case it was ‘WSS_Content_fa5cc7a0686e424bbe4fc128b4a48cf4’

Right click the database select tasks select Offlinethen select Detach.

Get the mdf and ldf file for the database.

Attach the files and create a new database.

Now to Central Administration Site Application Management Create a new web application

Let the name of the database as default.

Now go to Content Database within Application Management Select the web application just created.

Click on the Database Name Select Database Status as Offline and Check Remove Content database check box.

Now click on Add Content Database In the Database Name specify the name of the new restored database.

This is the point we can get this error “A SharePoint database named ‘….. ‘already exists. You must supply another name for the new database”

The solution for this is to go to

SharePoint_Config database There run this query

delete from Objects where name=’name of restored db’;


0x80040220 SecLib::CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: dd80d8b7-6700-dd11-9838-001185e68627 and PrivilegeId: 0b609bc5-afb0-4576-8db0-7ad715375833 Platform


We upgraded from CRM 3 to CRM 4, and certain users got this error while trying to access the CRM.

We realized that the users receiving this error had our own custom security role assigned to them. i.e System Primer.

When we assigned them any of the existing default security role there was no problem in accessing the CRM.

So the way we resolved was to assign a default security role and our own custom role to the user, so that he could access the system for the first time without any issues and

after the user has accessed it once than we removed the default security role.

This approach worked for us!!!!

Or another thing that worked was if we are assigning any custom role to users, we gave the write permission for user settings in that custom role.

the kb article for this error are


Consuming an Asp.NET web service using SOAP protocol from JavaScript

There are many ways we can consume a web service
The three common protocols for accessing a .NET web service are
The trasport protocol used for them is HTTP. However a web sercie can work on any other internet protocol like SMTP, FTP, Jabber, and TCP.

For HTTP GET and HTTP POST method you can refer to these posts
The proxy class generated by Visual studio for us using the wsdl itself uses the SOAP.
Let’s take an example of calling the simple web service using SOAP through java script.
Say this is our sample web service

[WebService(Namespace = “http://myNamespace/”)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
public Service () {
//Uncomment the following line if using designed components
public string HelloWorld(String name) {
return “Hello “+name;


The javascript code that we can use to call this web service using SOAP request would be this
<script type=”text/javascript”>
var xmlHttp;
function SoapCall()
// creatng the xmlHttp object
xmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”);
// Calling the web service using post and true means asynchronous call“post”, “http://localhost/WebSite/WebSite4/Service.asmx&#8221;, true);
// Setting the request header to let the web service identify the soap request we would be sending
xmlHttp.setRequestHeader(“Content-Type”,”text/xml; charset=utf-8″);
// http://myNamespace/HelloWorld – name of the webmethod
//[WebService(Namespace = “http://myNamespace/&#8221;)] which we had applied to our web service class
// setting the soap request body
var soapRequest=”<?xml version=’1.0′ encoding=’utf-8′?>” +
“<soap:Envelope xmlns:xsi=’'”+
” xmlns:xsd=’; xmlns:soap=’’>”+
“<HelloWorld xmlns=’http://myNamespace/’>”+
“<name>Nishant Rana</name> “+
” </soap:Body>”+

return false;


function doUpdate()
var responseXMLResult=xmlHttp.responseXML;
var result = responseXMLResult.lastChild.nodeTypedValue;

We will receive the following Soap Response
<?xml version=”1.0″ encoding=”utf-8″?>
<soap:Envelope xmlns:soap=”; xmlns:xsi=”; xmlns:xsd=””&gt;
<HelloWorldResponse xmlns=”http://myNamespace/”&gt;
<HelloWorldResult>Hello Nishant Rana</HelloWorldResult>

We can create our SOAP request by making use of the test page of our Web Service which we can open in IE.

Or else we can use Fiddler tool. (


0x80041102 -the entity with ObjectTypeCode = 4408 was not found in the Metadata Cache. Platform

I was receiving this error while I was using the tool JSExportFromCRM – a useful tool to backup javascripts for CRM.

While looking for the same the solution I found was this

First I ran this query

SELECT * from entity WHERE objecttypecode = 4408

It returned nothing

Than I ran the following query and it

select * from organizationuibase where ObjectTypeCode = 4408

returned a row.

So ran the following query (i.e deleted that entry)

Delete from organizationuibase where ObjectTypeCode = 4408

And than again run the tool and it worked properly!!