AJAX :: Javascript Fails To Connect To Web Service?
Jan 21, 2010
I am looking to incorporate web service into my application but am running into a problem. The following line of code in FwkComm.js document generates the following error: Microsoft JScript runtime error: 'FwkService' is undefined.
[Code]....
View 3 Replies
Similar Messages:
Jul 12, 2010
In IIS I have a virtual directory with only windows authentication enabled. From Javascript I call into a ASMX webservice. From the ASMX webservice I make a call to the SharePoint Search.asmx Webservice. whatever I try I keep getting the followin gerror message:
"The request failed with HTTP status 401: Unauthorized"
I use the following code to call the SharePoint webservice
[Code]....
My web.config settings are:
[Code]....
The Sharepoint farm is configured to use NTLM authentication.
Strangely everything works when I am testing in Visual Studio using the builtin webservice, but when I deply to my local IIS or Test Server it breaks.
View 1 Replies
Mar 2, 2010
I am calling a web service via Javascript. I tried it first in a web page that does not have a Masterpage and it worked perfectly. Then I moved everything over to a web page that does use a Masterpage, and I get a "Microsoft JScript runtime error: Object required" on the javascript statement that calls the web service. My javascript statements look like so:
[Code]....
The web service looks like:
[Code]....
The page source is:
[Code]....
View 5 Replies
Jul 6, 2010
I have the following config for roles using standard SqlRoleProvider, but I get an error when I try and open the Security page in the wweb site Admin tool:
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="AspNetSqlRoleProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="PoyntingInstallationConnectionString"
applicationName="/" />
</providers>
</roleManager>
The DB has all the role tables etc.
View 1 Replies
Jan 5, 2010
I have written code to access a text file in another server from my application in javascript. This code works fine in IE but fails in mozilla firefox. Below is the code i have written.
var httpRequest;
httpRequest = new XMLHttpRequest();
httpRequest.open('GET', url, true);
httpRequest.setRequestHeader('X-PINGOTHER','pingpong');
httpRequest.setRequestHeader('Content-Type','application/plain');
httpRequest.onreadystatechange = function() {alertContents(httpRequest);
httpRequest.send('');
function alertContents(httpRequest){
if (httpRequest.readystate == 4){
if (httpRequest.status == 200) {
alert(httpRequest.responseText);
}
}
}
View 2 Replies
Aug 25, 2010
I noticed that whenever my clients connect their accounts to my application, the Sys.UI returns null and the MaskEditTextBox is not longer showing the mask ... in other words is not working.
Did anybody have been thru this kind of scenario?
View 2 Replies
Aug 6, 2010
I have the following function that is trigered from an asp dropdownlist when an item is selected.
[code]....
The script sets a url depending on the selection from the dropdownlist.
It all works ok, but then the update panel updates and the javascript photogallary breaks.
How do I prevent this from happening.
View 17 Replies
Apr 6, 2010
I am using ASP.Net 3.5. I have fiiled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
View 1 Replies
Feb 15, 2011
i tried to use external assembly in my web service method (Web service is worked in LAN). This external assembly in their own internals use TcpClient to access to external IP address. But unfortunally. Creation of TcpClient fails.
System.Net.Sockets.SocketException was caught
Message=A socket operation has encountered a dead network xxx.xxx.xxx.xxx:xxxx
Source=System
ErrorCode=10050
[code]...
View 1 Replies
Jan 18, 2011
In my web site i'm using Asp.net web service (using javascript) to update certain values to DB. I'm concered about the security threats. How can i secure ASP.net Ajax web service using javascript
View 6 Replies
Apr 22, 2010
I had written a code to use webservice using scriptmanager... Everthing works fine with (IE -8,7 in xp and win server -2003) but in Win server 2008 IE -8 Javascript is not invoking the web method.
View 4 Replies
May 18, 2010
I'm trying to learn AJAX but I am having trouble getting things working. I downloaded an example app from the web that was written in C# and have got it working perfectly, the next stap was to convert it into VB but for some reason this does not work. I keep getting a "Error: 'myServices' is undefined " error message on the web page. Try as I might I cannot cure this and I know it is something so simple i'm just looking past it.
I'm trying to get some autotext functionality working but I've cut the code right down just to try and get it working, everything seems to work fine apart from the webservice call which returns the 'undefined' error. If I click the button on the web page the code behind is invoked and the webservice code is also run without problems. I just can figure out why I can't run the webservice directly from the web page.
The code
Default.aspx html/javascript
<%@ Page Language="VB" AutoEventWireup="True" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
[code]....
View 3 Replies
Feb 17, 2011
I am consuming a Web service passing it an XML string. The WS is querying a SQL Databse and returns an XML string. It all works fine from within Visual Studio 2010. Running the website from the browser, I receive the following error when calling ws.method "RQ.ProcessRequest(XMLOut, XMLIn)":
INNER EXCEPTION: System.Exception: The login failed when connecting to SQL Server SOMTSNAV01
[Code]....
Is there some additional credentials I need to pass to the WS? Is there anything that needs to be done on th WS side to ensure login does not fail? Ideas anyone?
View 1 Replies
Feb 21, 2011
I've got a web service on a server with valid IP and valid DNS entries. I'm using an asynchronous thread in a WPF .NET application to access methods from that web service. Under normal connection conditions, for almost all users, the connection and method works fine. Under a very specific condition - Verizon Aircard being used to connect, no VPN connection to the company through SSTP, on a PC with Forefront Client Security installed - the web service will return a "HTTP Error 400: Bad Request" error to the user. If the same user on the same PC connect their VPN connection, the method works flawlessly.
View 1 Replies
Mar 30, 2011
I have an ASMX web service which, in turn, creates a Service Reference which ultimately calls a third party web service. So, in essence, my ASMX is acting as a proxy to the thrid party service. This works fine on my development box.When I deploy to a target server and call my ASMX web service, it fails with an object instance not set error. On closer inspection, it looks as if the failure is in the line of code which creates an instance of the Service Reference - DIM XXX as new ServiceReference.I'm guessing that something has gone missing in the deployment, but can't see what.
View 1 Replies
Jan 13, 2011
I created a number of standard WCF Services (Service Contract and Host (svc) are in separate assemblies). I fired up a Web Site in IIS to host the Services (i.e., address is [URL]). Then in my Web Site project I added the reference. I am able to call the services normally. I am needed to call some of the services client side. Not sure if I should be looking at articles calling WCF services through AJAX, JQuery, or JSON enabled WCF Services. Some of the changes I made was adding the following to the Operation Contract:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "SetFoo")]
void SetFoo(string Id);
Then this above the implementation of the interface:
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Allowed)]
Then in the service webconfig I have this (parens are angle brackets):
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<baseAddressPrefixFilters>
<add prefix=[URL]>>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
Then in the client side I attempted this:
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<compositeScript>
<Scripts>
<asp:ScriptReference
Path=[URL]/>
</Scripts>
</CompositeScript>
</asp:ScriptManagerProxy>
I am attempting to call the service like this in javascript: wcfservices.SetFoo(string Id); Nothing is working. If it is idea or a better solution to call JSON enable, JQuery, etc.... I am willing to make any changes.
View 1 Replies
Mar 18, 2010
I've searched far and wide, but can't find out why this is happening. I have a clientside javascript ajax call into a web service that works fine if both the service and the calling page are in the same directory. If I try to move the web service to another virtual directory, I get this:
Exception type: InvalidOperationException Exception message: Request format is unrecognized for URL unexpectedly ending in '/js'.
Here are the relevant code tidbits for the separate directories attempt.
aspx file:
[Code]....
CallYahooQuotesServiceMethods.js:
[Code]....
asmx file:
[Code]....
I tried this in my web.config, but it didn't work:
[Code]....
Authentication mode is Windows. If I have to impersonate to do this, I'm not sure how I'd pull it off with Javascript.
View 2 Replies
Jul 12, 2010
I have and web application and there are two dropdowns. I want to use Javascipt to populate the the second dropdown on basis of the selection of the first dropdown.
View 2 Replies
Jan 20, 2010
We have an asp.net web service running on Windows Small Business Server 2008 SP2 (64-bit). It is in its own application pool. We've tried both Integrated and Classic settings for Managed Pipeline Mode. Enable 32-bit Applications is set to True. It is not able to successfully call a vb6 dll method but a Windows Forms app on the same machine can.Two vb6 dlls (A and B) are instantiated. The method in A is passed a reference to B as one of its parameters. That method then calls other methods within itself that also require the reference to B.Those internal method calls in A fail with this vb6 error (the A method logs these errors in the Windows Application event log):
70 (Permission Denied)
Another error is also logged in the Windows System event log:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {xxx} to the user NT AUTHORITYNETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.The object in question (a third vb6 component which is an ActiveX EXE) has already been configured using DCOMCNFG (Component Services) with full Launch, Activation, and Access Permissions given to NETWORK SERVICE and even Everyone. Additionally, from Explorer, full control/permissions have been give to all required vb6 components to NETWORK SERVICE (tried Everyone too).
A Windows Forms application on the same machine is able to successfully call the method in A. The same web service works on another machine with a 32-bit OS.Both the web service and the Forms app have been built with Platform Target set to "x86".How can we get the web service call to work on the 64-bit machine?
View 1 Replies
Mar 7, 2010
How can I pass two variable values to a web service web method using JavaScript and a DynamicPopulateExtender?
Some background of my issue:
I have a fully working cascading drop down list accessing a database.
My parent Cascading Drop Down List is a list of countries and the child displays the relative regions i.e.: USA returns Iowa, Maryland, Oregon etc.
I also have a 3rd Drop Down List control that allows the user to select the language to display the region details i.e.: Selecting the language of Chinese will return a list of regions of the USA in Chinese (held in the database).
I now want to display the translated country name from the 3rd Drop Down List in a label on the page.
I cannot just use the text from the country drop down list as this text value remains in English. The translated value must be returned from the database.
So far, I have installed a DynamicPopulateExtender:
[Code]....
I then wrote a web method (in the Cascading Drop Down local Web Service) to return the translated country name. To do this I have had to hard code the countryID (10663) and the translationLanguageID (1331) asshown below:
[Code]....
This does return the translated country name, but the variables are hard coded!
My question is how do I pass the countryID and the translationLanguageID to the Web Method GetTranslatedCountryName() from the DynamicPopulateExtender? Or even if there is a better way to achieve my task?
View 2 Replies
Apr 1, 2011
Scenario : I am going to access external web service [ExternalWS] using AJAX. So obviously, need to create local proxy service [LocalProxyWS] first, which in turn will access the external web service. Now, the external service webmethod [Process] basically redirects the current page on our site to their site, does some work and then return back to our site.
What I want : I want that when the user clicks the button ('Process') on our site, it should open a new window and then starts executing the request on the new window, so that I can have the page on my website to be displayed permanently (which will poll a request every 15 seconds to the external service (via local proxy) for the status).
Local Proxy service which calls external service is as follows..
[ServiceContract(Namespace = "LocalProxy")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class LocalProxyToExternalService
{
[OperationContract]
public void InitiateTransaction(string amount)
Basically, I am opening a new window from the button click and then want to process the new request in that new window, so that I can show the status to the user from the current page on my website So far, it opens the new window, but doesn't transfer the request on to that, but I get an error message in firebug as follows...
View 1 Replies
Jan 24, 2011
I'm new to WCF web services never done anything with them before and I'm being asked to create a page to connect to a WCF web service I have no idea where to start and I've searched the internet with no success. Does anybody have an example of an asp.net page connecting to a WCF web service? I've set up the WCF web service on my server but do not have a clue on how to actually connect or query it to get my XML data back.
The WCF web service is set up as it's own URL and only has 2 files within the root one being the web.config. I somehow need to query this URL and get some XML data back from it.
View 2 Replies
Apr 6, 2010
I am using asp.net 3.5. I filled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
View 3 Replies
Nov 17, 2010
I am trying to trigger a postback if a certain condition is true. Initially, a user will click on a button on my form, the server does some work, and in the process of doing that work it assigns a hidden field the value of '1'. When the page reloads after that very first postback, I am trying to use javascript to check the hidden field, and if it is '1' I need the page to postback again so the server side can do some additional processing. The reason for doing it this roundabout way is so that I can create controls on the form from my C# code behind as well as download a file in 1 user interaction. Here is what I have so far:
<script type="text/javascript" language="JavaScript">
function atload() {
var HWInfo = document.getElementById('HiddenHW').value;
[code]...
View 3 Replies
Mar 8, 2011
I have an ASP.NET web app where I use an ado sql connection to connect to a database on a SQL Server. The ado connection string is provided with a user login that has sufficient rights to read/write to the database. I originally pushed out the web app in its own IIS web site, using its own application pool and everything worked fine.
However, I am now trying to include the web app under an already existing web site. Everything seemed to work fine until I tried any functionality that called for an INSERT or UPDATE to the database. It turns out the user connecting to the DB didn't have sufficient permissions. Finding this strange, I did some research and found a forum post that suggested the IIS Web Site service account needed read/write permissions in the SQL database in order for an app to perform INSERT/UPDATE. Is this true?
I tested it out, and yes, indeed it worked, only with the Application Pool Identity account. The deatails of my scenario are as follows:
The web app's first IIS Web Site had an application pool Identity that ran under NETWORK SERVICE, which already had a login for SQL SERVER The already existing web site's application pool Identity runs under a domain account. This site already runs another web app that connects to the same database using LINQ (developed by someone else). I am relatively new to web development and am more familiar with ADO, so that is the route I chose.The domain account mentioned above formerly had no SQL Server login/user mapping. I set it up as a dbowner, and viola, the new web app worked under the existing web site.
While I found a way for it to work, we would rather not create a SQL login for this Identity account. We want the login provided in the web app's ADO SqlConnection to be the one to actually connect, because isn't that the point of it?
View 1 Replies