Is it possible to test some AJAX functions on a asp.net development server or do I need to upload the solution to a webserver and test it online ?
On my request.open method my url is "~/AjaxResponse.aspx?task=deleteCustomer&ID=4" and this won't work
http://localhost:1487/mydomain/AjaxResponse.aspx?task=deleteCustomer&ID=4 works
Why is that ?
The IIS Developer Server provides you with everthing you need.
If you are using MS Ajax (with Script Manager etc), then just start your application from Visual Studio directly and put a breakpoint in the method that is called from your AJAX code -- and you can debug it.
Still, you can also use your own custom-written asynchronous queries in your code: as long as they are valid and the services you're requesting are up and running, you should get no error message.
Related
I have an application that his a .Net Core API.
Everything works locally, and by that means,
Client App --> hits an .Net Core API successfully.
Howevever we have pushed the app to IIS Server, and we are not able to successfuly hit the API.
I know this is extremely vague, but what is something that I should be looking at to diagnose address this. I pulled the code from the published branch, and it works like a charm on local, but does not work on Server.
I do not get any Server Side exceptions.
Is there network connectivity? Log into the server and open a browser and put in the URL to the API. Any HTTP error is good. It means you can reach the API. If it times out, that's bad and that's your problem.
How do you know there are no exceptions? Are you logging all exceptions? Are you sure no exceptions are hidden in try blocks that end up ignoring the exception?
Assuming it's a Windows server, check the Event Viewer for warnings or errors.
I'm attempting to access the system clipboard using ASP with Chrome. The server page includes System.Windows.Forms, among other dependencies. When I debug the page using the ASP Development Server through Visual Studio, the page runs fine, and does what I expect. However, if I try to run with IIS, without debugging through the ASP Development Server, I get 500 internal server error. I've searched on getting more information about the error, but it seems that Chrome doesn't provide a method for retrieving "non-friendly" server error messages. Any ideas on what could be going wrong? What is different about the ASP Development Server provided by Visual Studio from the ASP Server in IIS? Thanks in advance.
Woah there cowboy, you don't want to reference System.Windows.Forms from a ASP.NET project. System.Windows.Forms is used for native windows application development and it will not be accessible through a website and certainly not through IIS.
If you're trying to access the clipboard on your page, then check out this answer from elsewhere on SO. It is a simple flash control that you can embed in your page which exposes the clipboard to your page javascript so you can manipulate that data as needed from there.
Dear All,
I am working on the Web application, at time of run the my application open login page but browser disconnect from my application. So I am not able to debug the code.
Please help how to stop this disconnectivity between browser and my web application.
Assuming you are using Visual Studio then all you need to do is put a breakpoint in a method that you know is going to be hit in order to debug the code i.e. your login forms page_load method.
A more fundamental point is that the client/web server model is stateless and that there will be no connection between your browser and the server between requests.
Ok, a few answers here depending on what you are doing. If you are using the built in web server in Visual Studio you simply have to set break points within your code. If on the other hand you are using IIS and Visual Studio in combination then all you need to do is set a break oint in your code and attach Visual Studio to the relevant w3svc worker process, if in doubt select them all.
It's something I do virtually every day and it works very well indeed.
simes
I have an ASP.NET application running on two almost identical Virtual Windows Server 2003. The first one is my develop and test server. I have installed the .NET WebExtensions for Framework 2.0 there and the application runs well. Now I tried to publish the same application on a second server (lets call him the production server) and also installed the .NET WebExtensions there and compiling and database access runs as well as the complete APS.NET application. Except for calling the static PageMethods through JavaScript AJAX calls. I have used the developer tools of the IE8 to debug into the JavaScript and found that it works identically. Still, all calls of the WebMethods return and internal server error (error code 500) saying "Unknown web method index.php".
Does anybody know what might be wrong with the production server or which configuration need to be changed?
The main difference between the two servers is that the production server uses .NET .../Framework64/v2.0.50727/aspnet_isapi.dll, while the test server uses .../Framework/v2.0.50727/aspnet_isapi.dll.
Some more details:
All PageMethods are static, return a string and have the WebMethod-Attribute.
On both servers the JavaScript creates an XmlHttpRequest object using the resolved URL "http://myDomain/myPage.aspx/myWebMethod" and the "Content-Type"-Header "application/json charset="utf-8" and the bodies contain the correct JSON definition of the parameters for the PageMethods.
Of course all ASPX-pages that use the AJAX PageMethods do have an ASPX-ScriptManager hving the EnablePageMethods-attribute set to "True".
I have solved my problem. There was an ISAPI_ewrite on the production server configured to work globally on all websites. After I have changed that setup to website individual ISAPI_Rewrite for those websites that need to use that rewrite, the AJAX XmlHttpRequests work.
A client has a ASP.NET web service on a shared server (hosted environment). You can go to the web service URL and view the documentation page (xxxxx/service.asmx?WSDL) and see all the methods. Using a tool such as SoapSonar you can execute any of the methods, but the response is always as if you sent (xxxxx/service.asmx) - in other words the web service documentation page.
Is this a medium trust environment? - I don't know, they don't know, don't ask
There are no errors returned or logged.
This is on a Win2k3 server with 3.5 Framework installed and II6. The webservice was build with Visual Studio 2008 and works locally, just not in this environment.
The client has no access to the server, the third party server provider is trying but of limited experience using ASP.NET web services.
Any thoughts on what could cause this type of behavior? What to look for?
Turns out the issue is that the client web.config contains the following entry:
cookieless="AutoDetect"
which causes a 302 redirect /xxxxx/xxxxxx.asmx?AspxAutoDetectCookieSupport=1
(hence it appears that the documentation page is always returned).
Can you verify that the header is sending a POST, rather than GET?