Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Service1.svc/

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3062.0

What I have tried:

I created wcf services when i run it..its showing below error
Posted
Updated 27-Feb-20 3:19am
Comments
Richard MacCutchan 27-Feb-20 7:51am    
Without much more information no one can possibly guess what your code is doing. Please edit your question and add some proper details including the code where the error occurs.
Member 14738666 27-Feb-20 8:00am    
[OperationContract]
[WebGet(UriTemplate = "GetUserLogin/{UserID}/{Password}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
Users GetUserLogin(string UserID, string Password);
Note: the above code I wrote in interface
F-ES Sitecore 27-Feb-20 9:03am    
You are requesting /Service1.svc/ but your UriTemplate is GetUserLogin/123/...
Member 14738666 27-Feb-20 8:02am    
public Users GetUserLogin(string UserID, string Password)
{
Users us = new Users();
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
con.Open();
SqlCommand cmd = new SqlCommand("spUserLogin", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@UserID", UserID);
cmd.Parameters.AddWithValue("@Password", Password);
SqlDataAdapter da = new SqlDataAdapter(cmd);
con.Close();
DataSet ds = new DataSet();
da.Fill(ds, "tb_Users");

return us;
}
note; this above code I wrote in svc class after that when I run this code I got above error
Patrice T 27-Feb-20 13:38pm    
Use Improve question to update your question.
So that everyone can pay attention to this information.

1 solution

The error is a HTTP error message: 404, which menas "page not found"
HTTP 404 - Wikipedia[^]

What it means is that whatever is talking to your WCF service can see the server, but not the service at all. At a guess, it's looking at the wrong server, or teh service hasn't been started or installed.
We can't fix that for you!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900