我有一个Web Api应用程序.当我使用VS 2010调试开发服务器测试它时,它运行得非常好.但我现在将其部署到IIS 7.5,并在尝试访问应用程序时收到HTTP 404错误.
这是我的web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-FlowGearProxy-20123141219;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="true" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" …Run Code Online (Sandbox Code Playgroud) 我正在尝试获取我的debug.keystoremd5密钥,以便获取Google地图的API密钥.
我运行命令:
keytool –genkeypair -alias armand -keypass pass
Run Code Online (Sandbox Code Playgroud)
然后运行命令:
keytool -list -alias armand -keystore debug.keystore
Run Code Online (Sandbox Code Playgroud)
然后我输入我的密码,它给了我以下错误:
keytool error: java.lang.Exception: Alias <armand> does not exist
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我想获得第一个响应者的视图,目前我有一个包含UITextFields的UITableView,使用一种方法:
-(UIView*) findFirstResponder
{
}
Run Code Online (Sandbox Code Playgroud)
我希望能够获得第一个响应者的视图,然后对该视图执行某些操作.
有任何想法吗?
我想知道是否有任何微信专家可以告诉我是否有办法通过使用WeixinJSBridge或其他方式在微信内查看URL时获取用户开放ID?
我发现的大部分资源都是中文,我不能使用它.
谢谢
我在用
[UIColor colorWithRed:136 green:155 blue:218 alpha:1.0];
Run Code Online (Sandbox Code Playgroud)
更改表格视图单元格的背景颜色.
但由于某种原因,背景只是保持白色.如果我试试
[UIColor colorWithRed:0 green:155 blue:218 alpha:1.0];
Run Code Online (Sandbox Code Playgroud)
颜色变化.这对我来说没有意义.有什么建议或提示吗?
我有一个UITableView我添加了一个tableFooterView,由于某种原因,tableFooterView它没有出现?
我如何添加我的 tableFooterView
我在重新加载数据后添加了tableFooterView一个connectionDidFinishLoading方法tableview.
所以我做的是
[controls reloadData];
UIView *myFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 100)];
if(self.item.canRunOnDemand)
{
UIButton *buttonRunWorkflow = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[buttonRunWorkflow addTarget:self action:@selector(runWorkflow:) forControlEvents:UIControlEventTouchDown];
[buttonRunWorkflow setTitle:@"Run Now" forState:UIControlStateNormal];
buttonRunWorkflow.frame = CGRectMake(15, 5, 290, 44);
buttonRunWorkflow.backgroundColor = [UIColor clearColor];
[buttonRunWorkflow setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[myFooterView addSubview:buttonRunWorkflow];
}
if(item.canRunAlways)
{
UILabel *canRunAlwaysLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 46, 100, 44)];
canRunAlwaysLabel.backgroundColor = [UIColor clearColor];
canRunAlwaysLabel.text = @"Run Always:";
UISwitch …Run Code Online (Sandbox Code Playgroud) 我使用Knockout.js在我的Web应用程序上收到以下错误
Cannot use 'in' operator to search for 'length'
Run Code Online (Sandbox Code Playgroud)
我的代码:
$(document).ready(function () {
AjaxRequest();
});
function AjaxRequest() {
$.post("../../Api/DisabilitiesHandler.ashx?method=get", function (data) {
var viewModel = {
disabilities: ko.observableArray(data)
};
ko.applyBindings( viewModel, document.body);
});
}
<table>
<tbody data-bind="template: { name: 'disabilitiesRowTemplate', foreach: disabilities }"></tbody>
</table>
<script type="text/html" id="disabilitiesRowTemplate">
<tr>
<td>Name:
<input data-bind="value: Name" /></td>
<td>
Active <input type="checkbox" data-bind="checked: Active" /></td>
</tr>
</script>
Run Code Online (Sandbox Code Playgroud)
这是我的模特
public class Disabilities
{
public int Id { get; set; }
public string Name { get; set; …Run Code Online (Sandbox Code Playgroud) 我在使用AsyncTask时遇到了一些问题.
我实现如下
private class MakeConnection extends AsyncTask<String, Void, String> implements OnDismissListener{
Context context;
ProgressDialog myDialog;
public MakeConnection(Context conetext)
{
this.context = conetext;
myDialog = new ProgressDialog(this.context);
myDialog.setCancelable(true);
myDialog.setOnDismissListener(this);
}
@Override
protected String doInBackground(String... urls) {
//do stuff
}
@Override
protected void onPostExecute(String result) {
try {
myDialog.dismiss();
success(result);
}catch(JSONException e)
{
data = e.toString();
}
}
@Override
protected void onProgressUpdate(Void... values) {
myDialog = ProgressDialog.show(context, "Please wait...", "Loading the data", true);
}
@Override
public void onDismiss(DialogInterface dialog) {
this.cancel(true);
} …Run Code Online (Sandbox Code Playgroud) 我正在构建一个mvc 4 web api,但是当我尝试向web api发帖时,请求返回
"The requested resource does not support http method 'POST'."
Run Code Online (Sandbox Code Playgroud)
我的请求标题
User-Agent: Fiddler
Host: localhost:53393
Content-Length: 39
Content-Type: application/json
Run Code Online (Sandbox Code Playgroud)
我的请求机构
{
"username":"",
"password":""
}
Run Code Online (Sandbox Code Playgroud)
路线
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
Run Code Online (Sandbox Code Playgroud)
和我的控制器中的方法
[HttpPost]
public MethodResponse Authenticate(string username, string password)
{
ConsoleServiceClient service …Run Code Online (Sandbox Code Playgroud) 我是Dynamics CRM的新手,并开始学习如何开发使用CRM Web服务的自定义应用程序.
我有Dynamics CRM SDK,我从微软提供的实验室开始,所以我现在有一个小型测试应用程序,可以列出已登录用户的组织.
此测试应用程序可以创建新的帐户记录,但我真正感兴趣的是访问重复实体.
我有以下内容
Entity location1 = new Entity("account");
location1["name"] = LocationName.Text;
location1.Id = this.OrgService.Create(location1);
MessageBox.Show("New Location ID is " + location1.Id.ToString());
Run Code Online (Sandbox Code Playgroud)
但我真正想做的事情就是这样
Entity location1 = new Entity("incedent");
location1["title"] = LocationName.Text;
location1.Id = this.OrgService.Create(location1);
MessageBox.Show("New Location ID is " + location1.Id.ToString());
Run Code Online (Sandbox Code Playgroud)
但我得到一个例外,说明没有这样的实体,但当我通过IE登录CRM时,我可以创建一个没有问题的案例.
我假设我的方法是错误的,所以我希望有人可以指出我正确的方向使用这些WCF服务和我可以用这种方式创建的可用实体列表,以及如何创建新案例/ incedent实体.
谢谢
c# ×3
ios ×3
android ×2
iphone ×2
asp.net ×1
asp.net-mvc ×1
cocoa-touch ×1
iis-7.5 ×1
javascript ×1
keytool ×1
knockout.js ×1
openid ×1
uicolor ×1
uitableview ×1
wcf ×1
wechat ×1