api在iis 7.5中不起作用 [英] api is not working in iis 7.5

查看:96
本文介绍了api在iis 7.5中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i正在做一个mvc4应用程序



因为我有一个api控制器叫做LoginController在我的Controller文件夹中。



在登录视图中,当点击登录按钮时,api控制器方法将被调用



Hi,

i am doing an mvc4 application

in that i have a api controller called LoginController in my Controller folder.

in the login view, when click on login button, that api controller method will called using

$.ajax({
                      url: "/api/Login/Authenticate?username=" + username + "&password=" + password,
                      type: "Get",

<运行vs2008时它的工作情况是




。我在我的localhost中发布了这个,但是当点击登录按钮时,这个api没有调用。 br />


iis 7.5详细错误404.0未找到显示



如何解决这个问题



谢谢

K. unjammu




its working when running vs2008. i published this in my localhost, but when click on login button, this api is not calling.

iis 7.5 detailed error 404.0 not found is showing

How can solve this

Thanks
Kunjammu

推荐答案

.ajax({
url: / api / Login / Authenticate?username = + username + & password = +密码,
类型: 获取
.ajax({ url: "/api/Login/Authenticate?username=" + username + "&password=" + password, type: "Get",







运行vs2008时的工作情况。我在我的localhost中发布了这个,但是当点击登录按钮时,这个api没有调用。



iis 7.5详细错误404.0未找到显示



如何解决这个问题



谢谢

Kunjammu




its working when running vs2008. i published this in my localhost, but when click on login button, this api is not calling.

iis 7.5 detailed error 404.0 not found is showing

How can solve this

Thanks
Kunjammu


这篇关于api在iis 7.5中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆