Posts

System.Net.Http.HttpClient' does not contain a definition for 'PostAsJsonAsync

Error: 'System.Net.Http. HttpClient '  does not contain a definition for 'PostAsJsonAsync ' and  no  extension method ' PostAsJsonAsync ' accepting a first argument of type 'System.Net.Http. HttpClient ' could be found Solution:  You need to add a reference to System . Net . Http . Formatting . dll This can be found in the extensions assemblies area. A good way of achieving this is by adding the NuGet package  System.Net.Http.Formatting.Extension  to your project. Faced this problem in  QFLES

Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly " ". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Azure Error

I faced this problem during development of application https://www.qfles.com Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "PageOne.Dependency". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\home\site\repository\QflesAdmin\QflesAdmin.csproj] This Error I was facing when I was deploying the Code to Azure from GitHub. Problem - Your Solution referring the dlls by HintPath like this.  <Reference Include="PageOne.PD">       <HintPath>..\PageOne.PD\bin\Debug\PageOne.PD.dll</HintPath>     </Reference>     <Reference Include="PageOne.Services">       <HintPath>..\PageOne.Services\bin\Debug\PageOne.Services.dll</HintPath>     </Reference> Solution - It should not re...

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property in DotNet with jquery or AngularJS. write your action method as below [HttpGet] public ContentResult LoadBackDoorCustomers() { var data = adminService.ListBackDoorCustomers(); var json = JsonConvert.SerializeObject(data); //return Json(new { success = true, data = json }, JsonRequestBehavior.AllowGet); var result = new ContentResult { Content = json, ContentType = "application/json" }; return result; } angularjs Call $scope.listBackDoorCustomers = function () { $http({ method: 'GET', url: '/Customer/LoadBackDoorCustomers', dataType: 'json', }).then(function (response) { $scope.gr...

ERR_CONNECTION_RESET - when you run application from visual studio over https

This site can’t be reached The connection was reset. Try: Checking the connection Checking the proxy and the firewall Running Windows Network Diagnostics ERR_CONNECTION_RESET This error normally comes when local iis express certificate has corrupt. So please repair the IIS it will solve your Problem. How-to-enable-ssl-for-a-net-project-in-visual-studio How-do-i-restore-a-missing-iis-express-ssl-certificate

A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance

Ok, this exception "A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance" can happen with NHibernate if you have an entity with a list of other entities with the .Cascade.AllDeleteOrphan() mapping. If you clear the list by assigning it a new List<entity>(), this exception will appear. Instead clear the list by using the .Clear() method. Error Code using( var session = _sessionManager.GetSession())         using (var transaction = session.BeginTransaction())         {             var order = repository.GetOrderEagerlyByOrderId(session, fromDb.Id);             var now = DateTime.Now;             const string user = "GNB\\Username";             var future = now.AddYears(1);             var taxType = new TaxType(0, "Code", "Alterna...

Drop Down width increases automatically in IE 11

Add the onmousedown attribute and have it focus on the select dropdown so that it loses focus from the input box. For some reason focus on the input before accessing that select causes this error. <select onmousedown="$(this).focus()">

Cannot open database "" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\'. after hosting on IIS

Image
Looks like it's failing trying to open a connection to SQL Server. You need to add a login to SQL Server for  IIS APPPOOL\ASP.NET v4.0  and grant permissions to the database. In SSMS, under the server, expand Security, then right click Logins and select "New Login...". In the New Login dialog, enter the app pool as the login name and click "OK". If you are using some custom app pool then give your app pool name.