Questions




Answers
1
How to include anti-forgery token in ajax request in ASP.NET MVC?

When I am posting Form using jQuery Ajax in my ASP.NET Zero template, I am getting this error "Invalid anti-forgery token" or "The required anti-forgery form field \"__RequestVerificationToken\" is not present."

How can I Include in it in my AJAX Request in ASP.NET MVC, here is my current jQuery code

...
Read More
Answers
1
Send message to all clients if a recurringJob in hangfire is started using SignalR in .net core2

Hi, I have made a recurring job in my asp.net core application using HangFire.IO, which trigger after 5 min of interval, here is my C# Code

...
Read More
Answers
1
Getting error "Child actions are not allowed to perform redirect actions" in MVC

I am using ASP.NET MVC and trying to use HTML.RenderAction to render partial View, inside Main View, but getting error as "Child actions are not allowed to perform redirect actions."

Here is my .cshtml code 

...
Read More
Answers
2
How to create download link using anchor tag in HTML?

I have a link of File created on amazon s3, now I would like to create a link to download the file inside table <td>, so How can I create download link using anchor tag <a> in HTML?

...
Read More
Answers
2
Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Hi. I have installed the package Microsoft.AspNetcore.SignalR.  And when run my project I have faced this error :

Could not load file or assembly 'Microsoft.AspNetCore.Connections.Abstractions, Version=2.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. 

how can I resolve this issue? Thanks.

...
Read More
Answers
1
How to use NuGet Package in Visual Studio Code Linux Ubuntu to add package.(.net core2)

Hi, I'm new at using Visual Studio Code on Linux Ubuntu to create a web site (asp.net core2). I have installed NuGet Package in my Visual Studio Code but want to add some package.

...

Read More
Answers
1
How to read powershell script file from log parser and save data in sql using c#?

Bascially,LogParser is used to read IIS logs.We upload one log file to log parser, select query and we get results of query like :user agent,ip address(basically hits to particular url).That query is PS(PowerShell Script) file.

Any idea how to read that PS file and save output of that query to db?

...
Read More
Answers
2
How to add the SignalR client library in ASP.NET Core 2?

Hi, I'm using SignalR with .net core2 in Visual studio 2017 to send message to all users. But I don't know how can I add the SignalR client library.

My current javascript code is :

<script src="Scripts/jquery-1.6.4.min.js"
type="text/javascript"></script>
<script src="Scripts/jquery.signalR-0.5.2.min.js"
type="text/javascript"></script>
<script src="signalr/hubs" type="text/javascript"></script>
<script type="text/javascript">

var myHubProxy = $.connection.hub.CreateHubProxy("MyHub");
myHubProxy.on('ClientsListener', function (msg) {
// alert to test
alert(' message from server');
//$("#messageDisplay").text(msg);
})
$.connection.hub.start().done(function () {
myHubProxy.Invoke('MyServiceFunction');
})

</script>

In Which my project not contains those scripts :

<script src="Scripts/jquery-1.6.4.min.js"type="text/javascript"></script>
<script src="Scripts/jquery.signalR-0.5.2.min.js"type="text/javascript"></script>
<script src="signalr/hubs" type="text/javascript"></script>

Please how can add the SignalR client library. I was try this : But I remarked  no file clled Client_side library to add it .

...

Read More
Answers
1
Web service returning 500 failed to load resource error

When I try to call C# Web service using jQurey, I am getting error "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"

I'm trying to send a call using ajax but in Chrome it is raising an error here is my code

JQuery:

...
Read More
Answers
1
How to get lat/long using Google address autocompete api using Javascript or jQuery?

I am currently using Google's address autocomplete api to get the locations (address) as shown in example here

https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

Now I would like to get only Latitude and longitude of address, when user selects the address.

How can I do this using Javascript or jQuery?

...
Read More

Page 13 of 51