Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
my api is working from browser.when I hit form browser or fiddler then its working fine.
but when I hit from my mvc project by click a button then its not working.calling example......

HttpClient httpclient = new HttpClient();
httpclient.BaseAddress = new Uri("http://localhost:56315/api/index/get");

note:MyAPI Project is an another project and mvc is an another project.that means two separate project.

so please help me

What I have tried:

moreover I tried only assigned port number.like as below

HttpClient httpclient = new HttpClient();
httpclient.BaseAddress = new Uri("http://localhost:56315");
Posted
Comments
Kevin Marois 11-Feb-16 13:07pm    
What do you mean when you say "Its not working"? Do you get an error? What happens when you try it?
Member 10299393 11-Feb-16 15:13pm    
line execute without any error but my not get output

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