Distribute Web Service As DLL And Specify Endpoint In Web.config?

Dec 28, 2010

I have a Web service currently in an ASMX file. I want to move this code into its own class library project which generates a DLL. I want to be able to drop this DLL into any Web application and have it work. However, without an ASMX file, I have no URL endpoint. How do I get around this? Essentially, I want to run a Web service without having to distribute an ASMX. I just want to distribute a DLL. Can I map the endpoint for the Web service in the web.config, or something? (I think that perhaps WCF might do this, but one look at the config for that, and it feels like the cure is worse than the disease...)

View 3 Replies


Similar Messages:

WCF / ASMX :: Web Service Endpoint Is Not Seen In App.config?

Jan 4, 2010

I do not understand what is happening here. If I run this same bizApp referenced from a webpage my code finds the endpoint in either my web.config file for the webpage. I copy that same section and paste it into the New version of web page that uses a new WCF that contains this same bizApp and I get a can not find endpoint.

[code].....

View 1 Replies

WCF / ASMX :: How To Check That Which Endpoint Is Calling WCF Service

Aug 27, 2010

How can i check that which Endpoint is calling WCF Service.

View 1 Replies

Endpoint Not Found When Attempting To Access Service Via

Oct 2, 2010

I get "Endpoint not found" when attempting to access my service via the browser at

[URL]

I get "Error: Cannot obtain Metadata from http://localhost:10093/Services/Service1.svc" when attempting to access the same address from the wcftestclient.

If I place a breakpoint in the service implementation it is hit, so I assume the svc file is setup correctly:

<%@ ServiceHost Language="C#" Debug="true"
Service="MyApp.Core.Service.Service.MyAppService,MyApp.Core.Service"
Factory="CommonServiceFactory.WebServiceHostFactory,CommonServiceFactory" %>

Here is my config:

[code]....

View 3 Replies

C# - How To Configure Endpoint For Web Service Declared With WebService() Attribute

Oct 13, 2010

We have a C# Web Service that declares itself using attributes. The code-behind file looks like:

[WebService(Namespace = "http://the.web.service.url/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public sealed class TheWebservice : WebService
{
[WebMethod]
public SomeObject TheFunction()
...

The web services has worked for a long time now. Recently, one request resulted in an error:

The maximum string content length quota (8192) has been exceeded while reading XML data. After searching around, I found that there is a setting maxStringContentLength that can increase the meaximum size. The post says you can configure this setting in Web.config in the BasicHttpBinding section. You can then specify that BasicHttpBinding in an endpoint section. But since we declare the webservice using the WebService attribute in the code-behind file, we do not have an endpoint section.

Is there a way to specify an endpoint using a declarative attribute? Alternatively, is it possible to switch from attribute to web.config mode without breaking existing clients? Am I confusing WCF and its predecessor here?

View 1 Replies

Distribute .dat File With Library?

Jan 27, 2011

I have a .dat file which I was given to use for a test application. I would like to distribute this file with my library. How can I do this without needing to tell them copy this here to this folder etc.

View 3 Replies

How To Distribute Mail In 5 Different Email Ids

Feb 21, 2011

I have many mails send, and keep on increasing all the times based on few actions in my site. So if I have several mails to send by only one email id it will take long time to send all of them and also that
email id will have lot of load. So I want to distribute those mails to 5 diff ids so that load of one email id will be distribute

All this I want to do using web service, so that I can send mails asynchronously.

View 3 Replies

WCF / ASMX :: How To Distribute Web Services

Sep 21, 2010

Using ASP.NET 3.5 /C# / VS 2008.

I have written some web services that I want to make available to others by subscription. The subscribers need to use the service from a specific domain / IP address and also authenticate with a user Id and password.

What exactly should I distribute to the subscriber so they can use the services, while exposing the least about my code?How can authenticate a consumer of services without always passing an Id / password for each service?

View 3 Replies

Web Forms :: Get Application To Run SQL Queries And Distribute Information To All

Jul 19, 2010

Im using vb,net sql2005, ajax, .net3.5 I need some advice, ive developed an application that allows us to send real time alerts to users via audiences (each user belongs to one of 15-20 audiences), approx 1200 online at any one time. We create the alert, which is stored in SQL table, User logs in, and every 3 minutes from this point we run an sql query getting all alerts applicable to user (Using ajax timer) As you can imagine this could be very very resource heavy, so my question is, is there a way i can get the application to run the sql queries, for each of the possible audiences and maybe store this inside an xml file and then query the XML file which? This would effectivelly mean just 1 user (the application) querying the data with 15 queries and then all users getting the data from an XML file.

View 4 Replies

Configuration :: Distribute Aspx Files On Disc?

May 21, 2010

I have a collection of aspx files that I need to send to a client on a CD/DVD who may or may not have IIS and the .NET framework installed.

View 1 Replies

AJAX :: Changing Web Service URL In App.config?

Jun 16, 2010

Is it possible to change the url that the web service is using in the app.config file once the windows application is running? Example a user changes the index of a drop down that will change the URL of the web service?

What I'm trying to accomplish is having a drop down that will let the user select between using the web service on our dev system versus the live system.

View 4 Replies

.net - Cannot Set Authorization Rules In Web.config For WCF Service

Feb 9, 2011

I read on a post that you can use ASP.Net authorization in the web config to control access to a WCF web service to replace the following attribute:

[PrincipalPermission(SecurityAction.Demand, Role="Administrators")]

To test I have been using "Administrators" which is a valid role so should allow me access and "TEST" which isnt. This works fine when using the above attribute however when I comment that out and use this in my Web.Config file:

<authentication mode="Windows" />
<authorization>
<allow roles=".TEST"/>
<deny roles="*"/>
</authorization>

It still allows me access.

So I was wondering if I have just got something wrong in the web.config or whether what I read was wrong saying to use that.

Just for reference this is the post I looked at:

Using Windows Role authentication in the App.config with WCF

and the following is my web.config:

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Windows" />
<authorization>
<allow roles=".TEST"/>
<deny users="*"/>
</authorization>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpEndpointBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="WcfService1.ServiceBehaviour1" name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding"
name="BasicHttpEndpoint" contract="WcfService1.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfService1.ServiceBehaviour1">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>

View 1 Replies

C# - WCF Service Not Impersonating Specified User In Config?

Mar 2, 2011

I have a basic WCF service using basicHttpBinding. I have my site project and my services project. In my site project, I have a regular Services Reference to a service in my services project. In my development environment, it works fine. However, in our staging environment, we have enabled impersonation on the services application. This service connects to a SQL database using this user, of course.

The issue is, while the other ASMX services seem to impersonate just fine with the user defined in the web.config, the WCF service is still running as the site's user, causing SQL authentication to fail.

Are there extra steps to enable impersonation for my WCF service? I have not done anything special beside adding:

service.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Delegation;

After I initialize my service proxy from my website.

View 1 Replies

Silverlight Web.Config Setting For Web Service Reference URL?

Nov 12, 2010

I have a Silverlight control that is hosted within an ASP.NET application. The Silverlight control has a web service reference. The URL of this service is going to vary when we install the application for our customers. I need a way to be able to change this web service reference URL from within the web.config of the ASP.NET application. How can I do this?

View 2 Replies

Setting Variables In Web Config For Web Service Consumption?

Apr 6, 2010

I did a couple google searches about this and am not finding anything, so I thought I'd ask here. I'm working on our internal CMS and I noticed that we're getting live data back when doing debugging because of our web services instead of the dev data that I wanted. It doesn't do this on our dev CMS website, but we're trying to do all our development on localhost. Is there any way to set up an environment variable in our web config for the URL so that the CMS points to the dev database instead of live database that is referenced in the wsdl files?

View 3 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

WCF / ASMX :: Toggle Between Prod And Test Web Service Without Changing Web.config?

May 5, 2010

My web.config is set up so that I don't have to change anything between deploy from UAT and Production. I can determine what machine it is running on and then programatically pick the correct connection string etc from the web.config based on the name.

Now we are adding a call to a web service which now causes us to have to make a change at deploy time. We set a "Region" flag in the web.config and then in coded an IF statement to call the appropriate webservice based on the flag so all we'd have to change is the "T" to a "P" when moving to production. But then hardcoding a web service in the application is not what we want to do. Nor do we want to change the web service address in the web.config.

Is there any way we can do something like the following to be able to not have to change the web.config at deploy?

It would be something like:

1. Grab current Machine name

2. Look in web.config for corresponding machine name web service reference (like we do for connection strings etc)

3. Use that web service in the processing.

View 4 Replies

C# - Dynamically Switch WCF Web Service Reference URL Path Through Config File

Feb 18, 2011

dynamically switch WCF web service reference URL path through config file. how do you do this?

View 3 Replies

What Does IMetadataExchange Endpoint Actually Do

Jul 5, 2010

I'm working on a web service that uses ASP.NET security model (i.e. with AspNetCompatibilityRequirements set to allowed). Like many others, I got an error saying the Anonymous access is required because the mexHttpBinding requires it and the only way to get around it is to remove the mex endpoint from each service as described here:

[URL]

I thought by removing mex endpoint I will no longer able to generate WSDL or add a reference to the service from Visual Studio but to my surprise everything still works. I quickly googled the "mex binding" but most web sites just say it's for "Metadata Exchange" without going into too much detail on what it actually does.

View 2 Replies

WCF / ASMX :: What Is The Advantage Of A Mex Endpoint

Feb 8, 2011

What is the advantage of using a Mex Endpoint over setting

[code]....

I am not able to add the service using Add Service Reference. I am not able to get the WSDL using a browser.

2. If I add the tag <serviceMetadata

httpGetEnabled="true"

and remove Mex Endpoint, I am able to query the wsdl using browser and I am still able to add a refernce using Add Service Reference.

Then, What's the specific use of Mex Endpoint.

View 2 Replies

WCF / ASMX :: Does Support Multiple EndPoint

Feb 11, 2011

Does WCF support multiple EndPoint.

View 4 Replies

WCF / ASMX :: Endpoint Address Won't Update

Dec 16, 2010

I had to move a WCF service (IIS hosted) to a new address. This service is called by a webforms web site on a different site in the same instance of IIS. I checked the WCF service is available and working by calling it directly from a browser.

I then did the following

updated the Service Reference folder in my consuming website updated the web.config servicemodel section (it was auto updated by changing the Service Reference) re-built and deployed libraries using the WCF service to the websites bin folder Stopped the consuming website in IIS and deleted files from Temporary ASP.NET Files folder Re-started IIS and deleted *ALL* files from Temporary ASP.NET files
When I browse to a page that calls the WCF service I get the error;

EndpointNotFoundException

There was no endpoint listening at <<Old endpoint address>> that could accept the message

How can I force my website to use the new WCF endpoint? Do I need to re-start the web server?

View 2 Replies

Custom Description Page For The WCF Endpoint?

Mar 14, 2010

I am migrating an ASP.NET Web Service toward WCF. The old Web Service endpoint had a nice extensive description page generated from the comment of the underlying class exposed as a service endpoint. In particular, all available web methods were listed.

Is there a way to emulate somehow this behavior with WCF? At least, how can I customize the HTML content of the WCF endpoint?

View 1 Replies

Expose WebHttpBinding EndPoint In Framework 4.0?

Oct 2, 2010

I'm trying to expose a webHttpBinding EndPoint using Framework 4.0.

<endpoint address="web" binding="webHttpBinding" contract="MyContract"/>

However, when browsing using WFC Test Client, I see nothing. If I change my Framework target to 3.5, it works fine.

Is there something different in 4.0 to get this to work?

View 2 Replies

Web Reference Endpoint URL And Configuration Question?

Feb 21, 2010

I have a project ("The Project") that references an external web service. I am then referencing that project in an ASP.Net web application ("The Web Application"). When I reference "The Project" in "The Web Application" the app.config is not copied over, which isn't a problem. Does "The Project" take care of know what endpoint to use? Can the web.config override the endpoint URL? I did a test and am not reference the eternal web service in "The Web Application" and everything seemed to work ok. I guess, can I create the same configuration section, that is in "The Project's" app.config and copy it over to the web.config file to override?

Update: I guess what I really need to find out is how to change the end point of a web service when generating the code from adding a "Web Reference". I tried adding a service reference to my code, but the wsdl is not getting loaded correclty or I am doing something wrong. Update 2.0: I forgot about the URL property of the proxy that is generated by the web reference.

View 1 Replies







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