Hi,
Is there any update in jtable for this?
Thanks
Hi,
I have checked this middleware. All links are showing related to ASP.NET core. But i am working in ASP.NET MVC.
Thanks
No
Hello,
In Redirec_uris i had added all uris with or without www. My issue is its working with www but not without www.
Thanks
Hi,
I have published my website and tried to using google login with this. I entered "www.mysitename.com" in the address bar then its successfully logged in via google authentication. But when i entered just "mysitename.com" in address bar then google login is not working. It is redirecting me back to login page. Can you help me with this, why its redirecting back to login page when i type address without www. Why its not creating session.
Thanks
Hi , i want to restrict the pdf access from URL without login. If the user has logged into website then only they can access the pdf file otherwise they will redirect to login page.
We tried using File protection handler in a Normal MVC application. it is working fine, but when we implement in ASP NET Zero it is not working. Sometimes it is not redirecting to File protection handler method. Can you give any workaround on this or provide any method method to restrict PDF access.
I am using the following code:-
Web Config - i have added following line in web config under handlers tag.
<add name="PDF" path="*.pdf" verb="*" type="ProjectLearn.Web.FileProtectionHandler" resourceType="Unspecified" />
After that added File protection handler class in my project. There is processRequest method in this class as follows:
public void ProcessRequest(HttpContext context)
{
switch (context.Request.HttpMethod)
{
case "GET":
{
// Is the user logged-in?
if (!context.User.Identity.IsAuthenticated)
{
context.Response.Redirect("~/Home/Index");
return;
}
string requestedFile = context.Server.MapPath("Temp/"+context.Request.FilePath);
// Verify the user has access to the User role.
if (context.User.IsInRole("User"))
{
SendContentTypeAndFile(context, requestedFile);
}
else
{
// Deny access, redirect to error page or back to login page.
context.Response.Redirect("~/Home/Index");
}
break;
}
}
}
Please let me know on this or any other method that we can use.
Thanks
Thanks @ismcagdas
I read somewhere on stackoverflow that aspnetzero customized DataTables to support consumption of AppServices. I need access to those functions as well so do I need to include anything additional in package.json?
In package.json, I added the following-
"datatables.net": "^2.1.1",
"datatables.net-bs4": "^3.2.2",
"datatables.net-responsive": "^2.2.3",
"datatables.net-responsive-bs4": "^2.2.3",
"datatables.net-select": "^1.2.7"
then in bundles.js - for "output": "view-resources/Views/_Bundles/frontend-libs.min.js", added the following
"wwwroot/lib/datatables.net/js/jquery.dataTables.js",
"wwwroot/lib/datatables.net-bs4/js/dataTables.bootstrap4.js",
"wwwroot/lib/datatables.net-select/js/dataTables.select.js",
"wwwroot/lib/datatables.net-responsive/js/dataTables.responsive.js",
"wwwroot/lib/datatables.net-responsive-bs4/js/responsive.bootstrap4.js"
Executed: npm run create-bundles
When I try to use DataTable like- var dataTable = _$table.DataTable({ .. .. });
It gives error on browser that _$table.DataTable is not a function
Is there anything I am missing?
I guess my questions is that the way I have implemented SignalR is working fine but is it the right way to do it in ASP.NET Zero template?
Thanks.
Hi Team, I am new in SignalR with ASP.NET ZERO. I was tried to implement the SignalR in asp.net zero project as per below code statements
public class MyHub : Hub { public void Refresh() { Clients.All.refreshglobally(); } }
On Button Click Event
$.connection.hub.start().done(function () { abp.signalr.connect(); var kanbanHub = $.connection.kanbanHub;// Get a reference to the hub kanbanHub.server.refresh(); });
Global Function for all clients
function refreshglobally(){ abp.message.success("Record Updated"); }
In the view of above statements, Can you please provide me best way to implement SignalR in asp.net zero and can I call hub methods from server side (As we done in JavaScript like this “$.connection.hub.start().done(function(){})” )
Thanks in Advance.