我试图使用vscode在ubuntu上运行和ASPNET核心应用程序。当运行应用程序时,它给我这个错误:
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at …
Run Code Online (Sandbox Code Playgroud) 嗨,我使用 WCF RestFull 服务工作,使用 JsonNet 序列化我的对象我有这个方法:用户对象有一个属性类型 byte[] 像这样
public class User
{
public int Id {get;set;}
public string UserName {get;set}
public byte[] Photo {get;set;}
}
Run Code Online (Sandbox Code Playgroud)
但是我发了一个帖子,照片的大小超过 41 Kb 得到了 HttpStatusCode“413 请求实体太大”
[WebInvoke(Method = "PUT",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "/user/{id}/")]
public Stream EditUser(string id, Stream input)
{
try
{
string json = input.ConvertToString();
User usr = json.FromJSON<User>();
usr.Update();
return null;
}
catch (Exception ex)
{
SetInternalServerErrorResponse();
return GetResponseError(ex);
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的网络配置
<bindings>
<basicHttpBinding>
<binding …
Run Code Online (Sandbox Code Playgroud) 我有这个Angular2组件,我尝试使用PersonServie发出两个HTTP并行请求(工作正常).但该Observable.forkJoin
方法抛出此错误:EXCEPTION: TypeError: this._subscribe is not a function in [null]
评估getIdentificationTypes()
和getPerson()
功能,每个返回一个Observable
对象.
我错过了什么?
import { Component, OnInit } from 'angular2/core';
import { Router, RouteParams } from 'angular2/router';
import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router';
import { Observable } from 'rxjs/Rx';
import 'rxjs/Rx';
// more imports for models and other components//
@Component({
selector: 'my-coponent',
templateUrl: 'template',
directives: [ROUTER_DIRECTIVES]
})
export class MyComponent implements OnInit {
public identificationTypes: IdentificationType[];
public person : Person;
// some public and …
Run Code Online (Sandbox Code Playgroud)