web service hosted on same web server from ASP.NET Ajax web site

Hi,

    We have create an ASP.NET AJAX enabled website and an another web service. Both were hosted on same server but have two different virtual directory. I have specified the 'Path' attribute of '<ServiceReference>' element of ScriptManager as 'http://localhost/virDirectory/myWS.asmx" (Absolute path). But when I run the ASP.NET application I am getting error. Same code worked when i moved asmx page to the asp.net application folder and point 'Path' attribute of Script Manager to relative one like Path="myWS.asmx". I have also given 'inline' attribute to false. Is it not possible to call a web service hosted on same web server from ASP.AJAX web site. Do both need to be hosted under same virtual directory (same application). Pls reply. I got stucked with this.

 
Sreejith 


Sreejith
http://tips4dotnet.blogspot.com/
0
sreejith77
4/10/2008 10:08:40 AM
asp.net.networking-webservices 2181 articles. 0 followers. Follow

1 Replies
1085 Views

Similar Articles

[PageSpeed] 49
Get it on Google Play
Get it on Apple App Store

I believe the ScriptManager registered services are restricted to services running the local app, yes.

You can use the WebRequest class built into the ASP.NET AJAX client side framework to make a call to services on the same domain that aren't part of the local app.


Encosia - ASP.NET, AJAX, and more.

Latest article: Using complex types to make calling services less… complex
0
gt1329a
4/11/2008 4:40:50 PM
Reply:

Similar Artilces:

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Troubleshoot Web Service; Ajax AutoComplete events do not appear to not fire; Ajax web service appears to not work. .NET
Folks, I had the situation that Ajax AutoComplete events in the web service did not fire after I copied a project out of a folder, renamed it and moved it to a server. The fix was hard to find but easy to solve. I had some web service modules in an ASMX file that provided AutoComplete entries -- i.e., after the user keys in 2 or 3 characters, the list of possible entries with those leading characters is displayed for the user to select. To solve the problem, look at the web service's directive, not the code-behind or the ASMX designer.  Do a right-mouse-click...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Best Practice for .Net Web Service access to a Web Service on a Test and Production Servers
Hello All, What is the best way to control a .Net web service to be able to access a remote server for testing and then point to another remote server to access the web service in production? Do I need to generate and maintain 2 different proxy objects? TIA, Bob Bob // first create the proxy if not isvalid( i_service) then i_service = create fundtraderproxy_TradeServicesClient_BasicHttpBinding_ITradeServices end if ///You'll see code something like this in the constructor of your proxy //dynamically set the endpoint url with the user supplied value - //r...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Can "Add Web Reference" if web service deployed to new web site, Can't add ref if deployed to Virt Server under Default web site (Sharepoint)
I have created a web service wich I can deploy successfully to a new IIS Web, but of course I have to set the port to something other than 80 (and I'd rather just use a virtual server under the Default web). If I try to deploy my web service under the Default Web as a new virtual server, and then try to "Add a web Reference" to the service, it fails with a 404: not found error. Notes: WServer 2003 My IIS server is running Sharepoint Portal Server (SPPS)sp2.  VS2005 Any ideas? /Bob C in GRR In Sharepoint Portal Admin I had to add a Path Exclusion.  Took me a whi...

Ajax call web services failed after convert web site into web project
Hi Guys I have one web site application and use ajax call web services. it is working very well. 1. Master page set up scriptmanager with webservices path. 2. Web service inside web site application under app_code named ajaxwebservice.cs 3. Javascript call ret=ajaxwebservice.method(id, oncomplete(),ontimeout(),onerror()); But after I convert web site into web application project, the ret=ajaxwebservice.method(id, oncomplete(),ontimeout(),onerror()); failed, the ajaxwebservice in undifined error. I use the same web.config, master page, I put my ajaxwebservice.asmx and ajaxwebservic...

Converting Web Site to Web Application (AJAX web service goes missing)
I have just completed (almost) an exercise to convert a web site to a web app (acedemic reasons - just to see the differences).A few bumps on the road such as copying class files to the new solution and wondering for a while why the classes did not show up.  It was because the properties for the class file were "content" rather than "compile".  Also copied all my images to a newly created image folder outside the IDE.  There is no context menu item to refresh a folder in the Web App so it was out of the car and back in to fix that.One problem remains. ...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Ajax error calling Web Service from Web Application Project vs Web Site
I am implementing the code from the Asp.Net Ajax Video Demo “How Do I: Make Client-Side Network Callbacks with ASP.NET AJAX?”  The Web page is generating a javascript error (‘SimpleService’ is undefined) and is unable to recognize the Web service.  The downloaded examples work, however I have created the Demo (both the page and the web service) in a Web Application Project, rather than a Web Site.  The demo uses a Web site.  Because of this the page does not recognize the Web service. To ask the question another way: What needs to be done differently in a Web Service...

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

Cannot call a web service from java script using ajax in .net 3.5 web applications
As like 2005 .net websites i tried to consume a web service from client side java script  using Ajax script manager in  .net 3.5 (2008) version web application it was not working, Event it works with 3.5 web sites, What i have to do to solve the issue. Thanks in advance Hi, can you create the least amount of code to reproduce it and post it? This gives us the ability to check out your code and better guide you. Also please check out this article: Create a Simple WCF Web Service and Use In JavaScript With Visual Studio 2008 and .Net 3.5.  Grz, Kris.Read my blog. Handy Fire...

C# web service and web site hosting
I have developed a web service and consuming web site using asp.net 2.0 with visual studio 2005. I was wondering if there's any free web hosts I could host my service and website on?  you can try http://www.discountasp.net/ free for 3 month.Girijeshhttp://www.girijesh.in/ hi, My advice is to test and find reliable hosting provider for a good cost - $5 - $20 per month, also many hosting companies provides Money Back Guarantee. RegardsWindows Hosting ASP.NET | Top ASP.NET Hosts | Dedicated Windows Hosting You could try AspSpider.net for testing to make sure ever...

Web resources about - web service hosted on same web server from ASP.NET Ajax web site - asp.net.networking-webservices

United States Department of Health and Human Services - Wikipedia, the free encyclopedia
The United States Department of Health and Human Services ( HHS ) is a Cabinet department of the United States government with the goal of protecting ...

Sprint Dials Up Conversocial for Customer Service via Facebook Messenger
Wireless giant Sprint teamed up with Conversocial , a cloud-based social customer service solution and Facebook Marketing Partner , to provide ...

F5: MKM Cuts Estimates as Google et al. Make ‘ADC-as-a-Service’
... ) Google division and other cloud providers are increasingly developing software that displaces what the company does. “Additional Cloud Service ...

THE FINTECH ECOSYSTEM REPORT: The fight-or-flight moment in financial services is here
Technology is upending workflow and processes in the financial services industry. Tasks once handled with paper money, bulky computers, and human ...

Secret Service agent's gun, badge, ID card stolen near White House
CBS News confirmed the agent went discovered the missing items from his vehicle on Monday

Google expands Home Services Ads
Google is expanding its Home Services Ads throughout the Bay Area in a bid to capture more of the market.

First on CNN: Secret Service agent's gun, badge stolen near White House
CNN First on CNN: Secret Service agent's gun, badge stolen near White House CNN Honolulu, Hawaii (CNN) A Secret Service agent's gun, badge, ...

Secret Service agent's gun, badge stolen. Agency 'in crisis'?
Christian Science Monitor Secret Service agent's gun, badge stolen. Agency 'in crisis'? Christian Science Monitor Underlying the agency's ...

STOLEN: Secret Service Agent’s Gun, Flash Drive, Badge, Radio, Handcuffs
STOLEN: Secret Service Agent’s Gun, Flash Drive, Badge, Radio, Handcuffs

Taiwan market: Taiwan Secom provides retail management services via cooperation with Microsoft
Taiwan Secom, the largest residential/commercial security service provider in Taiwan, on December announced cooperation with Microsoft to provide ...

Resources last updated: 12/23/2015 12:29:32 PM