I have an asp.net web service which has SSL enabled via IIS. It works fine if the user uses https, however I have a user that insists on using http on the url.
What I'd like to do is have the web service (asmx) do the equivalent of the response.redirect to change http to https automatically.
I don't believe that I can do this from a web service so does anyone know a of a similar solution for web services.
I have a login form on the home page of an ASP.NET 3.5 website which for performance reasons needs to be accessed with a standard HTTP connection. Since the normal postback for an ASP.NET page is relative call for the post, it would mean that when the browser posts the values are sent unprotected.
I would like to do one of two things to make this secure:
Force the Postback to be secure to the same page Send the post to a different page using an HTTPS connection
Is there a way to implement option one?
I'm also looking at the Authentication Service, but looking at the URL reference it is using a relative path:
Okay, so I have a site which I'd like to use my SSL certificate for always. So I want all users to be forced to the https version of any url they are directed to.I used this code in my global.asax file:
[Code]....
I've also tried it in the 'Application_BeginRequest' function also. Basically, I have two directories that are secured via Windows Authentication against my domain. if you browsed to the directory (ex. http://www.domain.com/secure) it tries first to authenticate then redirect to https://www.domain.com/secure. In this case it will ask for credentials twice one right after the other. Is their a way I can have the user redirected before Windows Authentication kicks in?
I need to create an ASP.net web page application displays a report based on XML data.
I'm told that I must get my XML data from https://www.example.com/foo.xml. I would like for my ASP.net application to get the data server side, interpret it, and display a report.
I need to know to things:
1) How do I make the .net framework retrieve the XML data from https://www.example.com/foo.xml at run-time.
2) How do I get the data set to an appropriate object type so that my program can read it?
We just moved an ASP.net application to a new server and are now getting this error when we try to return to a page: Http/1.1 Service Unavailable
In testing, I find that the address of the page does not include the SSL designator. It is trying to use http:// instead of https://. This value is coming from the Context.Request.Url property of the page.
why Context.Request.Url would not return the "https" for a page under SSL?
I have a webservice which works 100% fine on my developer machine. Where Web Service is installed on LOCALHOST on my developer machine,Then i went to my servers, I installed webservice on one server and map it with the server where the website is hosted, Then i tried accessing this service using BROWSER from my web server, it worked fine, That means the mapping was done perfect.Then i run my program on web server (website). It worked fine on page1, then on page2, but when i did the same and call same function on page3, It popped me any error of
I am facing the issue "The page was not displayed because the request entity is too large."I am using ASP.Net 3.5, Sql server2008, IIS 7.5 and OS Windows 2008.I am finding the issue on following scenario:1. The error only shows up if the page is viewed as HTTPS (SSL).2. After login in the application if user waits for 1 min or more before doing a postback.Page size is about 200kb. It is running quite fine on Http.
My web services have base web service method called IsGood()I want to make sure every methods in my web service call IsGood() in base web service automatically without add code in each web service method, can I do that?
I am trying to deploy a wcf service. I have created a simple service, basically I have created a new wcf service and tried to deploy it however I get this error
The type 'WCF_Application.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
I am trying to deploy my service to a subdomain like https://services.mydomain.com/business
I created a WCF Service Library and there're 2 services (http endpoint and https endpoint) in the App.cofig file. The WCF Service Host had not problem to host the http endpoint but failed to host the https endpoint with these messages:
WCF Service Host cannot find any metadata. Additional Info: The service cannot be started. This service has no endpoint defined. Please add at least one endpoint for the service in config file and try again.
I am new to windows Phone 7 application. Here is my requirment that follows,
1/ I have web service created in php using http. (ex: http://abc.com/allservices/api.php?Task=getData&Email=ab1@abc.com&Password=1234)
2/ if i call that url i can get response in xml foramt.
3/ if I type this url in browser adddress bar with changes the http to https. the browser ask me to continue with this url. If i click this i can get the same response in xml format with certification error.
4/ once again i do the same step, this time the browser don't ask me to continue. I don't why.
5/ From my Windows Phone 7 application is working fine when I use http.
6/ If i change the url http to https I want to get the same xml.
7/ But i get only Server Not Found exception .
8/ Is there any posible way can I acess the web server using Https with Certification error..
I am kinda new to WCF and the setting up of service and have 2 questions. My first question I have a service that will be accessed via https on a web server. However locally on my local IIS7, it will be accessed via http as https is not available. How can I set up a service to be accessed by both?
My second question is regarding how I can set up a service that requires a username and password to be accessed. The service that I have in place I dont want methods within it to be accessed unless the calling application has the rights to do so?
Here is an example of the relevant area of my web.config file.
<system.serviceModel> <bindings> <webHttpBinding> <!-- standard AJAX binding that supports SSL --> <binding name="TransportSecurity"> <security mode="Transport" />
[Code].....
In this config, the service is set up for http only and not username/password applied to it.
we have a situation where we need to host two certificates on the same server and because we can't have two different certificates on the same server running off the same port we have assigned one certificate run through another port, which is 4443.
So the URL to our web app is now....
[URL]
If I punch this into a web browser I can access it fine, however, if I create a web reference using this URL in Visual Studio (2005) it can create the web reference fine and it builds ok. But whenever I call a web method on this service instance I get a HTTP 404 page not found Exception.
Is there any properties I need to set on the web service object to get this to work? I'm confused as to why it's not working.
We set up a paypal gateway on our site using paypal NVP API: Our IIS web server is set up for SSL, though I just created a cert on the locally machine. When we load HTTPS the browser gives a warning about security before the page will load. I know a local cert won't cut it for SSL, so I think we need a verisign cert? [URL] Is this correct? How can I know that the cert I am getting will get along with paypal and elimante any security warnings for the user.
i redirect a page from http to https using http module begin request handler .i am calling webservice using ajax but it is saying webserice not defined .which otherwise works fineits work fine when rediect page in page_load instead .but i need to add function for https to http in every page. i still not know why ajax is not working when i use http module for redirect
I have a WCF Service that I have boiled down to next to nothing because of this error. It is driving me up the wall. Here's what I have now.
A very simple WCF service with one method that returns a string with the value, "test". A very simple Web app that uses the service and puts the value of the string into a label. A web server running IIS 6 on Win 2003 with a SSL certificate.
Other WCF services on the same server that work. I publish the WCF service to it's https location I run the web app in debug mode in VS and it works perfectly. I publish the web app to it's https location on the same server the WCF service resides under the same SSL certificate I get, "The remote server returned an error: (403) Forbidden" I have changed almost every setting in IIS as well as the WCF and Web apps to no avail. I have compared setting in the WCF services that work and everything is the same.
Below are the setting in the web.config for the WCF Service and the WEB app: It appears the problem has to do with the Web app but I am out of ideas.
I'm submitting a request to a web service, but I'm receiving some errors. They've asked to see an example of the xml request and response. I used Visual Studio to consume the web service, so I'm just calling a method in my code - I don't actually see any xml. Is there a way to grab the XML request and response as XML or at least a text string?
I've got this application that works locally and when deployed and using a .mdf SQL Express database file (which I usually use for testing purposes). However, when I change it to work with our SQL Server 2008 the app works but the service doesn't. For example if in my code behind of a page I have a button that adds data to a table such as this it works fine:
public static string connString = @"Data Source=server1;Initial Catalog=Project;Integrated Security=True"; protected void btnAddProj_Click(object sender, EventArgs e) { using (var sqlc = new SqlConnection(connString)) { sqlc.Open(); var cmd = sqlc.CreateCommand(); int intProjectID; // Add the project info to the database cmd.CommandText = "INSERT INTO tblProject VALUES(@ProjName,@ProjTeam,@ProjStart,@ProjEnd)"; cmd.Parameters.Add("ProjName", System.Data.SqlDbType.NVarChar).Value = txtProjName.Text; cmd.Parameters.Add("ProjTeam", System.Data.SqlDbType.Int).Value = ddlTeamSupported.SelectedValue; cmd.Parameters.Add("ProjStart", System.Data.SqlDbType.NVarChar).Value = txtStartDate.Text; cmd.Parameters.Add("ProjEnd", System.Data.SqlDbType.NVarChar).Value = txtEndDate.Text; cmd.ExecuteNonQuery(); } }
My web.config is setup to use impersonation on that server and all works perfectly well. However, for my service the query doesn't seem to return anything and I get a 400 Bad Request error. The code for the jquery is:
$.ajax({ type: "POST", async: false, url: "Services/ProjectService.svc/test", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { console.log(data); } }); And for the Service: [ServiceContract] public interface IProjectService { [OperationContract] [WebInvoke(ResponseFormat = WebMessageFormat.Json)] ArrayList test(); } public static string connString = @"Data Source=server1;Initial Catalog=Project;Integrated Security=True"; public ArrayList test() { var sqlc = new SqlConnection(connString); sqlc.Open(); var cmd = sqlc.CreateCommand(); cmd.CommandText = "SELECT ProjectID FROM tblProject"; var reader = cmd.ExecuteReader(); ArrayList temparray = new ArrayList(); while (reader.Read()) { temparray.Add(reader[0]); } sqlc.Close(); return temparray; }
If instead of querying the database I have the service just return static data then it works fine. What could cause my service not to be able to connect to the database when the rest of the code behind for the app works?
I'm developing a client of a webservice in C# with VS.NET 2008.And I would like view the xml response of my request to the web service. which i have call . Is it posible?
I have an ASP.NET web application that I can't modify (I only have the binaries). This application connects to a web service and it seems like the connection is closed from the client side (my web app). I have increased the "executionTimeout" in the machine.config of the destination server but my web app seems to still stop after waiting for a while.
Is there a way to increase the timeout time for my web application by simply modifying the web.config? As I said... I can't modify the timeout in the code so my only option would be through config files.