.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error adding a web reference...how do I fix this?

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :ASP.Net

I am currently just trying to add a web reference to the app am trying to build and I keep getting an error each time I try to navigate to the URL (virtual directory) where I have my app locally...IIS.

The error that keeps popping up and I can't seem to get rid of this wrinkle...I am the admin on my personal machine, so I should have all permissions...which I do.

This is the error I keep getting. And here are what I have tried so far that has not resolved this

1) made sure that there were no duplicate accessType entries in the ApplicationHost.config and the web.config files

2) granted the READ permission to the IIS_IUSRS group for the ApplicationHost.config file

3) also granted the READ permission to the IIS_IUSRS group for the virtual directory

---this is on a Windows 7 machine with IIS 7. Please help...Thanks

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070005
Config Error Cannot

View Complete Post

More Related Resource Links

Error while adding reference to latest version of AjaxControlToolkit


HI All,

I am a bit new to ASP.Net Ajax and as such new to Ajax itself. I have a site which uses ASP.Net Ajax.  It used the version AjaxControlToolkit version 3.0.30512.0. I have now changed it to version 3.5.40412.2 by deleting the old reference and adding a reference to the latest one . I build the soultion and everything appears fine witjhout any errors. But the site fails to load showing a yellow page with the message AjaxControlToolkit Version="3.5.40412.2" missing reference to 'AjaxControlToolkit.ExtenderBase.Base Scripts.js.BaseScripts.js'. What does this mean ?

adding a service reference throws a contract error



I added a service reference via the add service reference method. I can see all of its services in the intellisense but when I run the project and it executes the line where I instantiate the service : MyProjectName.ServiceReferenceName.IServiceReferenceClient  client = new  MyProjectName.ServiceReferenceName.ServiceReferenceClient;

it throws this error:

Could not find default endpoint element that references contract 'ServiceReferenceName.IServiceReferenceClient' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.


Now this within my class library and I have added the service reference in my class library project.

Kind Regards


Registering controls of current assembly object reference NOT set error


Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?


Error while adding pollingduplex binding


I am making samle of polling duplex in .net 4.0

when ever i put binding this tag in web.config it shows error.


Warning    1    The element 'bindings' has invalid child element 'pollingDuplexHttpBinding'. List of possible elements expected: 'basicHttpBinding, customBinding, msmqIntegrationBinding, netPeerTcpBinding, netMsmqBinding, netNamedPipeBinding, netTcpBinding, wsFederationHttpBinding, ws2007FederationHttpBinding, wsHttpBinding, ws2007HttpBinding, wsDualHttpBinding, netTcpContextBinding, wsHttpContextBinding, basicHttpContextBinding, mexHttpBinding, mexHttpsBinding, mexNamedPipeBinding, mexTcpBinding, webHttpBinding'.    D:\DuplexTest\TestPollingDuplexWcf\TestPollingDuplexWcf\TestPollingDuplexWcf\Web.config    9    8    TestPollingDuplexWcf

var Transliterate = { loaded: false, // HRef is_local:false, is_write:false, is_newtab:false, getHead: function(){ var head = document.getElementsByTagName('head')[0]; if (!head) { return document.body; } return head; }, addGlobalStyle: function(css) { var head = Transliterate.getHead(); var style = document.createElement('style'); style.type =

Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

FileUpload error: Object reference error


I have a FormView with a FileUpload to upload an image in a database.

I keep getting an object reference error.(view code)

I am using this same script to upload the image to the database, but when I try to update the file upload I get the error.    

string strFilePath=Server.MapPath("\\images\\"+fupdImage.FileName);

        Byte[] image=null;
        HttpPostedFile imgVid=FileUpload.PostedFile;

        image=new Byte[imgVid.ContentLength];//Object reference not set to an instance of an object.

        if(FileUpload.HasFile) {
        string imageFile=FileUpload.PostedFile.FileName;
        int index=imageFile.LastIndexOf(".");
        string fileFormat=imageFile.Substring(index+1);


Error in / Application after adding employee search in webpart


Hello everyone,

I am working on sharepoint 2007 and I was editing the webpart of the software and after adding the predefined employee search table, the server has crashed while trying to access the server remotely with the following error message:

Error in / Application

However, while trying to login locally I have no problem and can easily login.

What will be the course of action in fixing this error.

Also the site is complaining of an invalid certificate even after adding an exception.

Any help would be greatly appreciated.

Thank You,

Chris Stanko

Error adding a document library to a site



I am receiving the error "Cannot complete this action.  Please try again"  when trying to add a document library to one of the sites.  This is Sharepoint 2007 SP1.  I seem to be able to do it thru designer but not the web interface.

Does anyone know how to fix this?

Getting error when a reference is added

Hi,      I am new to .Net, i am getting error when i add a reference to my project, i am attaching the error screen shot here, Do i need to addd any reference path anywhere else, i am using VS 2008. Thanks RaviWorking as a software engineer

Object reference error

Hi, I have an XML File shown below<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0"> <Title>Products</Title> <link rel="self" href="http://localhost:49200/" /> <updated>30-08-2010T04:17:45Z</updated> <author> <id>tag:localhost,30-8-2010:/support/products</id> <entry> <id>13137</id> <title>example</title> </entry> </author> </feed> I am trying to read the id tag in the entry tags but i get object reference not set to ............. error the code to read it isDim prddoc As New XmlDocument prddoc.Load(Server.MapPath("prd.xml")) Dim xmlList As XmlNodeList = prddoc.GetElementsByTagName("entry") Dim rootNode As XmlElement rootNode = prddoc.DocumentElement For ic As Integer = 0 To xmlList.Count - 1 response.write(prddoc.SelectNodes("//entry/id").Item(0).InnerText Nextthe error is on line response.write(prddoc.SelectNodes("//entry/id").Item(0).InnerTextplz help  

Error "Object reference not set" when I try to set a Navigation Property

I'm using Entity Framework. The following code throws a runtime error "System.NullReferenceException: Object reference not set to an instance of an object." The line before the error, it looks like newControl is in fact instantiated.My model has a Control entity and a ControlType entity. Control includes the Navigation Property "ControlType." I'm trying to set ControlType.Type = 2.SurveyFormControlsModel.Control newControl = new SurveyFormControlsModel.Control(); newControl = CreateControl(childTokenName, ControlTypeEnum.TextBox); newControl.ControlType.Type = 2; // <<--ERROR HERE context.Controls.AddObject(newControl);                                SurveyFormControlsModel.Control newControl = new SurveyFormControlsModel.Control();                                 if (listItems.Count == 0)                                 {                                     newControl = CreateControl(childTokenName, ControlTypeEnum.TextBox);                    &

Profile page throwing an error after adding some "ask me about" tags

After adding some "ask me about" tags my profile page is throwing an error. To be more precise the AskMeAbout WebPart ist throwing a thread aborted exception and I don't understand the reason for this error. After removing the tags the sites works again. Some tags work but after trying some other tags the profile page is broken again. Unhandled exception caught during execution of Microsoft.SharePoint.Portal.PageBase::ErrorHandler(). Exception information: Exception information: Microsoft.SharePoint.WebPartPages.WebPartException: Thread was being aborted. ---> System.Threading.ThreadAbortException: Thread was being aborted. at Microsoft.SharePoint.Portal.WebControls.AskMeAboutWebPart.RenderValues(HtmlTextWriter writer, Int32 startIndex, Int32 endIndex) at Microsoft.SharePoint.Portal.WebControls.AskMeAboutWebPart.RenderWebPart(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.WebPart.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) - -- End of inner exception stack trace --- at Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) at Microsoft.SharePoint.WebPartPages.SPChrome.RenderWebPart(HtmlTextWriter output, WebPart part) at Microsoft.SharePoint.WebPartPages.WebPartZone.RenderZoneCell(HtmlTex

Script error in adding users in sharepooint Site

I seem to have a problem when trying to enter new users on a newly built site (SharepointSite). I cannot select the new user option the grant permissions dialog doesn't appear. I'm running MS office 2003 sp3 and ie 7 regards Alan Bateman.

Adding web reference

Hi All,I have VS 2008 professional. I have created a web service. In one of my websites I want to add this web service. When i clicked on add web reference > web service on local machine, it is giving the error The Web services and Discovery Documents available on your VS.NET developer machine are listed below. Click the service link to browse that service. There was an error while enumerating services on local machine: Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. Another possible cause is that IIS is not installed on the local machine, or the user identity under which you are running may not have permissions to view websites on this machine. To view websites on this machine, make sure that you run Visual Studio as administrator. On Windows Vista computers with IIS installed, make sure that IIS Metabase and IIS 6 configuration compatibility feature is enabled. If i run the VS as administrator and try to do the same thing, it will show The Web services and Discovery Documents available on your VS.NET developer machine are listed below. Click the service link to browse that service. None - No Web services were found on the local computer. Plz help to solve this.Smitha

Object reference not set to an instance of an object error.

i've installed the VSeWSS.msi on VS 2005, i'm using SPS 2007, i'm developing on my workstation in C#, i've added the Mircosoft.Sharepointserver dll reference to my project but i still can't deploy a very basic webpart. i get the "Object reference not set to an instance of an object" error but there's no reference to a line, column, project or anyhting. very frustrating. any suggestions/links whould be appreciated.

Login error - Object reference not set to an instance of an object.

Hi all,I've set up the login section as a user control. WheneverI log in I get a "Object reference not set to an instance of an object", with the code stopping on this line: if (Membership.ValidateUser(txtUserName.Text,txtPassword.Text))Can anyone tell me how to fix this please?protected void LoginButton_Click(object sender, EventArgs e) { TextBox txtUserName = loggedin.FindControl("UserName") as TextBox; TextBox txtPassword = loggedin.FindControl("Password") as TextBox; CheckBox ckbRememberMe = loggedin.FindControl("RememberMe") as CheckBox; if (Membership.ValidateUser(txtUserName.Text,txtPassword.Text)) { FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, ckbRememberMe.Checked); } else { // Msg.Text = "Login failed. Please check your user name and password and try again."; } } <asp:LoginView ID="loggedin" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server"> <LayoutTemplate> <table id="mainbox" width="400"> <tr> <td width="150" class="label">

Adding a web part to "My Content" page causes error

Under a "My Content" personal page, a user (me) chose to add the "SQL Server Reporting Services Report Viewer" web part to a page. This was repeated with a test account and the same thing happened. Is there a way to fix this? Prior to this, adding a Content Editor Web Part seemed to work just fine.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend