我如何知道用于我的Webapi Ajax调用的端口? [英] How Do I Know The Port To Use For My Webapi Ajax Call?

查看:281
本文介绍了我如何知道用于我的Webapi Ajax调用的端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我刚刚在visual studio中使用webApi模板启动了一个应用程序。

我想使用knockoutjs来使用应用程序但我的问题是当我正在进行ajax调用时,我怎么知道视觉工作室使用的端口为您提供随机端口号。

例如:

$ .ajax({

url:http:/ /lhosthost.com:5068/api/someUrl

解决方案

.ajax({

url:http://localhost.com:5068 / API / someUrl

Hello, i just started an application in visual studio with webApi template.
I want to use knockoutjs to consume the app but my question is when i am making the ajax call, how will i know the port to use since visual studio gives you random port number.
For example:
$.ajax({
url:http://localhost.com:5068/api/someUrl

解决方案

.ajax({
url:http://localhost.com:5068/api/someUrl


这篇关于我如何知道用于我的Webapi Ajax调用的端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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