VS 2010 - Adding Reference To Web Service

Feb 2, 2012

I have a number of .Net web sites built in VS2010 using Framework 4.0that reference a web service to send emails.

My most recent site I created as a web application as opposed to a web site. In the Solution Explorer you can add a 'Service Reference' and, if you click the Advanced button you can then add a reference to a web service.

I did that and now the (web application) site won't build - it says it cannot load the Ajax dll. If I remove the reference to the web service, the site builds okay - if I add the reference back in, the site will not build.

Do I need to abandon the idea of using a 'Web Application' and turn it into a 'Web Site'?

View 9 Replies

Similar Messages:

Architecture :: DAL As Web Service - Adding A Service Reference To Project And Then Using The EF4 Context And Writing LINQ Queries Against The DB?

Feb 10, 2011

I'm currently trying to work out the best way to build this web application, which will then be intergrated on other systems, such as WinForms, Intranets etc.

We hope to include the usual layers i.e. DAL, BLL, BOL and UI but I have been experimenting with Entity Framework 4 and WCF Data Services and managed to get something in place where I was using WCF as a gateway to EF4.

i.e. Adding a Service Reference to my project and then using the EF4 context and writing LINQ queries against the DB


Now with the current setup I would still need to write a DAL Class Library, that interacts with the Data Service, because as I said WCF Data Services only seems to be a gateway, I can't see where to put the code (above) in the Data Service and then how I could these methods.

My questions are: 1. How do I develop a WCF Data Service in such a way to allow this behaviour - I know how I could do it using ASMX web service, something like [Code]....

2. If I am to use WCF Data Services, how is serialization handled (if at all) - again I know how to do something in ASMX web services

3. Again, If I am to use WCF, how do I add Security and only allow my applications to access the web service - for obvious reasons

4. Would it be possible / logical to also include the Business Logic Layer into the web service?

View 4 Replies

WCF / ASMX :: Create An Instance Of Web Service Without Adding Web Service Reference?

Mar 17, 2011

How to create an instance of web service without adding web service reference? How to identify the server address/name where the web service is hosted from C# code?

View 1 Replies

Adding Service Reference For A Wcf Service?

Sep 1, 2010

I am getting an error when i try to add a service reference of a WCF service. Error details is below. My web service is hosted on a different server and my client is on different server. When i run the service directly from IE i can see the service but adding it in .net web application i get error.


View 1 Replies

WCF / ASMX :: Getting Error On Adding Service Reference?

Aug 25, 2010

I am getting this error while loading(adding) it into service References (web client)

The type 'WcfTrial2.Calculation', provided as the Service attribute value in the ServiceHost directive could not be found.

How to resolve it?

View 1 Replies

Adding A Service Reference Throws A Contract Error?

Oct 20, 2010

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.

View 2 Replies

WCF / ASMX :: Adding Reference To Web Service Do Not Copy The .config File?

Jul 8, 2010

I am adding a reference of class library in web service in VS2008 and it is not copying the .config file from class library to web service. I have checked the property "Copy to output directory" of .config file and its value is "Copy Always".

View 3 Replies

Error Adding Service Reference The Server Committed A Protocol Violation?

Aug 19, 2010

After moving application to shared hosting I cannot add service reference to .asmx and WCF services that used to work on dedicated server.The error in adding WCF service reference is:

There was an error downloading 'address ... Service.svc'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
Metadata contains a reference that cannot be resolved: 'address ... Service.svc'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
If the service is defined in the current solution, try building the solution and adding the service reference again.asmx web reference:There was an error downloading 'address ... .asmx'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
There was an error downloading 'address ... .asmx/$metadata'.The server committed a

View 3 Replies

Visual Studio - Why Does Website Reference Assembly From GAC, When Adding Local Reference

Jan 7, 2010

When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file.

Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

View 3 Replies

C# - Why Does Silverlight Reference To Wcf Service Blow Up When Add Method To The Wcf Service That Returns Generic List

Aug 17, 2010

I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:

public String SfTest()
return "SF Test";

No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:

public List<String> GetTest()
List<String> list = new List<string>();
String a = "a";
String b = "b";
return list;

I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.

View 1 Replies

Is Url Of Web Service Fixed, When Reference For Web Service Is Implemented In Class Library

Feb 9, 2011

<Application architecture>I'm developing ASP.NET Web Application by Visual Studio 2008.(.Net Framework Version = 2.0)I put followin two projetcs in the solution.a. Class library which implements all the buisiness logic for application.
(I'll call it "ClassLib" in the followin sentence)b. ASP.NET Web applicatoin which presents UI.(I'll call it "WebApp")ClassLib uses Web Service which located on other server. So, I set web reference in it. Method for url settings for this web reference is "Dynamic".

View 1 Replies

WCF / ASMX :: Add Service As Service Reference To VB6 Winforms Application

Feb 7, 2011

How do I add the WCF service built using VS2010 as a service reference to a Winforms app which is written in VB6?

View 1 Replies

Web Reference Versus Service Reference

Jun 9, 2010

Using VS2008, I noticed that in Class Project I only have a choice of adding "service reference" where as in Web Application project, I have two choices "web reference" and "service reference".

I have used web reference. How is "service reference" different from web ref? and what's the major purpose of service ref?

View 1 Replies

VS 2010 - Web Service Runs Locally But When Deployed Has Error Could Not Create Type Service

May 24, 2012

I developed a web service in VS2010 on my local machine, wrote a consumer of it also locally, and that all works.

I copied the dll and the asmx file to our server, and I am getting an error when I try to invoke it from a browser (also still on the server machine) to make sure it correctly exposes its web methods, but it is not, it is saying "Could not create type 'Service'". That error comes from this line:

Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/WarrantyDuplicate.cs" Class="Service" %>
There other web services in the same folder on the server that all work fine so I don't believe it's an IIS setup thing.

This is my first web service in C# and when I created it in VS I did think it odd that the code behind file went into App_Code (as you can see from the line in the asmx file) and is just named dot-cs rather than asmx-dot-cs. But since it worked fine locally, I wasn't sure that mattered.

View 2 Replies

Adding Reference To DLL Is Not Working?

Jul 8, 2010

I have created a VB DLL by selecting File - New - Project and then Class Library

I added a "Properties" region and a "Function" region with some simple properties and one simple function. Compiled it and used it in another app with no errors.

At that point the only references in the project were the default references when creating the new project.

I then created a function that will take a file as a param and get the physical path and add the 2 together. In the function I use the "Request.PhysicalPath" method of the System.Web.UI.UserControl.

I then added areference to the System.Web DLL in my project.

PROBLEM IS I get an error on "Request" that says "Name Request is not declared"

So I googled the error which I found a thread that said to "just use HttpContext.Current.Request.Form" because "by default all websites developed in Visual Studio 2005 is Inherited from System.Web.UI.Page and Class files won't that's the resion we have to add System.Web.UI.Page namespace in the class file"

However when I added the "HttpContext.Current.form." before my "Request.PhysicalPath" I get the same error on "HttpContext".

What Am I doing wrong?


View 2 Replies

Configuration :: Adding Reference Again & Again?

Oct 4, 2010

I'm new to .net

I've following line in my code:

using Microsoft.ServiceModel.Web;

And it works fine as long as I add the namespace reference to microsoft assembly dLL System.ServiceModel.

The moment I copy the code on other machine, I need to redo everything. Is there any way so that I don't need to add this reference again & again?

View 13 Replies

Adding ADODB Reference In VS2008?

Jul 23, 2010

I need to be able to add a reference to ADODB in my code to access that particular COM object's result.

I have tried to add the adodb reference from the properties page of my site, but whenever I try to run the site after adding it I get this:


To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082


Why would this be? I've not encountered this before when adding the adodb reference. The source of the adodb reference is:

c:Program FilesMicrosoft.NETPrimary Interop Assembliesadodb.dll

The file is indeed in that directory.

View 3 Replies

Adding A C# Webpage And Reference To A VB.Net Website?

Apr 7, 2010

We have a web site that sits on a DotNetNuke platform and all of our coded modules are written in VB.Net for consistency. However, we have been sent a web page that works as a link and it is written in C# and references a cs file in its App_Code folder. If we try and load this into our website we get an error saying that it is not written in VB we then tried converting the homepage to VB but the reference folder is very complex and written in C#. Can we load the reference file even though it is C# and reference it using VB code. The current all is OurRemService RemService = New OurRemService(); where OurRemService is a file in the App_Code folder in the web page folder. The only other way around this is for us to set it up in IIS as a virtual directory and reference it directly but we would prefer to integrate it into our website.

View 1 Replies

Configuration :: Adding Dll Reference In Website?

Oct 17, 2010

Since a Web Site doesn't have a project file or a bin folder,

how will a Web Site identify of what are all the dlls to be used.

And if i am adding a third party dll to my web site, and i need to

add this web site folder to a source control, how should i include

this third party dll in the source control?

View 1 Replies

Adding Assembly Reference To Web Project?

Jul 7, 2010

Before using any class in your website project/page we have to add it's assembly reference to our project. Right?

Now, when I am using SmtpClient class from System.Net assembly after adding the System.Net.Mail namespace in namespace node of application's web.config file but without adding assembly reference to the project it still accepting and running the code. Why?

I enquired the machine's web.config file located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIG but didnt find any assembly reference for System.Net.

how it is working and where the assembly reference has been added and how?

View 4 Replies

Add A Web Service Reference In A DLL?

Feb 11, 2010

I'm creating a DLL with a reference to web services (I don't have the choice to do so) but I have to add web service references to the project that uses the DLL for it to work. Example, I have the DLL called API.DLL that calls a web service called WebService.svc that I want to use in a project called WinForm. First, I have to add a "Service Reference" to WebService.svc in API.DLL. Then, I add a reference API.DLL to WinForm but it doesn't work unless I also add a service reference to WebService.svc in WinForm.

View 4 Replies

WCF / ASMX :: Add Service Reference Reading Svc File But Not Reading Service?

Mar 10, 2011

I was trying to go through this tutorial:


but when I tried to add the service reference to the silverlight app, the Add Service Reference window would show me that there was a service file, but the node wouldn't expand to show the rest of the files that contain the services and what not. I got this error instead:

"An error occurred during the processing of a configuration file required to service this request. review the specific error details below and modify your configuration file appropriately."

"Parser Error Message:There is no service behavior named 'AdventureWorks_WebServer.Service1Behavior'."

"Metadata contains a reference that cannot be resolved: 'http://localhost:55579/Service1.svc'.

The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

If the service is defined in the current solution, try building the solution and adding the service reference again."

here's my web.config file:


View 1 Replies

Web Forms :: VS 2010 And Silverlight - Add Web Reference?

Apr 14, 2010

Either I am blind with excitement or something is missing from VS2010. I have created a Silverlight 3 project and simply want to add a web reference (not service reference) to the project. I cannot see the 'Add Web Reference' anywhere.

I added it to the toolbar and it was disabled. I saw somewhere that I might need to change the target framework version but I cant see where to do that in the project properties either.

View 1 Replies

Visual Studio :: Adding A Reference To A Project?

Apr 13, 2010

1. Is there a reason why someone would want to add a reference to an assembly (e.g. System.Drawing) but not add the Using statement? Seems that if you add a reference, you should add the Using statement automatically, but maybe not always?

2. Correct me if I'm wrong, the only benefit of adding a "Using" statement at the top of your file, is to bring into scope an assembly and not have to fully type the class name? So if I have a Using System.Drawing, I can type in
string = Color.Tomato.ToString(); instead of string = System.Drawing.Color.Tomato.ToString();

View 3 Replies

SQL Server :: Reference To Table For Adding Foreign Key?

Mar 10, 2011

I have four tables test1, test2, test3, test4

they dont have any primary keys.

I have a patient entry table, which has patientID as primary key. if I want to retrieve tests information about a particular test then I have to add a pid as foreign key??

do i have to add a test_ID kinda field in all four tests tables????

how to do this in sql server management studio.

View 7 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved