DotNetNuke: Dnn cdn change for local intranet execution - c#

We are running DNN 9.1.1 on a local network without internet.
A fontawesome CSS is loaded through CDN and we cannot find where is it defined.
Like showed in the below image the CDN is a not resolved host and fontawesome is not loaded:
I search in all my web folder, in the DB and DNN github sources but I don't find anything.
How can change the URL for loading locally fontawesome CSS?
Is it definided somewhere else?

Have you tried doing a text search for "font-awesome" inside all your skins folders: /Portals/_default/Skins/ ?
From your screenshot it looks like you're using Client Resource Management. Try disabling this, reload the site and right click > view page source on this page you posted. You should then be able to find the reference to font-awesome.

It appears to be added all the way at the bottom of the page below the </form> element. And then only when site is in Edit mode.
<!--CDF(Css|https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css?cdv=75)-->
A bit strange because all the core files are usually contained withing the DNN site itself. And it is the only file that is loaded from maxcdn.bootstrapcdn.com. The only other externally loaded file is an Open Sans font from fonts.gstatic.com

Related

ASP.Net website not rendering correctly on client

I have deployed a ASP.net website and for whatever reason the website is rendering like it should on the web server, but when i access it from a client some of the formatting is lost, so for instance the menu items disappear from the menu, i am at a loss as to where to begin as the website is functional, it just isn't rendering how it should, i suspect that it might have something to do with CSS, but really not sure.
I have tried to make remove some reference to bundles and called the style sheets directly using link with no difference.
I have checked i am able to access the site.css from a client too.
Having looked a bit further into it, IE is returning the following two errors:
SCRIPT5007: Unable to get property 'createElement' of undefined or
null reference jquery-3.3.1.min.js (2,6997)
SCRIPT5022: Bootstrap's JavaScript requires jQuery bootstrap.min.js
(6,31)
Have you checked the mime type registered on iis? It could be possible that the response for the css request could have a different mime type than what the browser expected and thus did not parse it/apply the style rules.
To check/fix this, open server manager -> browse to your site. In the IIS settings panel would be Mime types, ensure that text/css is the MIME Type for the .css extension, also in your link tag try including type="text/css" as well.
Thanks guys, managed to figure it out, the issue was there was a GPO setting that was ticked to display intranet sites in compatibility mode, i unchecked this and it began to work as expected, hope this helps someone else.

How to fix issue when entering www.sitename.com/ROBOTS.TXT in URL only refreshes the page

I have a site that's about to be taken down in month's time. What I need to do is place a robots.txt to prevent the search engine from indexing it any longer. However, after I placed the file on the root of the solution in the web server, and tried to check if I can access it by typing www.sitename.com/robots.txt, it just refreshes the screen or perhaps just returns to the home page. My application is running in MVC 3.
Things I've already tried:
Added modules runAllManagedModulesForAllRequests="true" in web.config
Used Dynamic Robots.Txt using IHttpHandler and Controller/Action approach (based on this link robots.txt file for different domains of same site)
Played around with MIME Types (removed .txt and back)
I am expecting to see the contents of the robots.txt file same as when I access a css file or js file just by appending the file name in the URL.

HangerFire shows 404 error in Production server while deleting faile jobs

When I am trying to delete the failed jobs in the production server i am getting 404 error but I am able to delete them in my local PC.
URL
https://mywebsite.com/hangfire/jobs/failed/delete
HTTP ERROR 404
URL
https://localhost:59141/hangfire/jobs/failed/delete
HTTP 200
Can anyone let me know why this is happening on the production server only.
There is only one server behind this url..
Thanks in Advanceā€¦
The issue actually I am facing was - I deployed the hangfire application inside the sharepoint website in IIS.
The path deleting the job was something like this on button click
http://SharePointWebsite/MyAapplicationWebSite/hangfire/jobs/failed/delete
This is the path that is getting generated by the hangfire code internally(I added the hangfire assembly reference to my project). My Share Point application due to some configuration issues is not accepting this huge path. So i changed the path to
http://SharePointWebsite/MyAapplicationWebSite/hangfire/jobs/faileddelete
(I removed one "/" in the path) which worked for me.
How to change automatic generated path :
Take the HangFire Code from GitHub which is opensource now
In the Dashboard Pages you will find FailedJobsPage.cshtml. Update this page contents with the short url that you want.
But this cshtml will not be rendered until you run the custom tool - "razor generator tool"(VS Extension) for this cshtml page which generates cs file
You can see these cs files already present in the GitHub Code (expand the cshtml page you will find the cs file)
After finishing the above steps make sure the same path is configured in the DashboardRoutes.cs file as well.
=========================
"ExtensionlessUrlHandler-Integrated-4.0" in "handlers" section
of SharePoint Application web Config is causing the actual issue

Is there a way in Visual Studio to configure the default start page for web deployment starting from Empty ASP.NET Web App?

Entry level web developer here, thank you in advance.
A very basic single page website starting from Empty ASP.NET Web Application adding each and folder file from scratch. Everything works fine locally bare bones. I'm trying to configure the start page in the subfolder "html" to the file index.html. I get the default "This website has been successfully created" after publishing. Azure web service is working fine because I can go to site.azurewebsites.net/html/index.html to see my page after it's published.
Right clicking the project and going to properties to set as start page, or going to Properties>Specific Page doesn't work as suggested here for deployment but works fine locally. Altering the web.config file as suggested here gives me an internal server error that is fixed once I remove the code
<system.webServer>
<defaultDocument enabled="true">
<files>
<clear />
<add value="html/index.html"/>
</files>
</defaultDocument>
</system.webServer>
I tried different variations of this all with the same internal server error. Is my syntax correct?
I then created a global.asax file and changed the Application_Start line as suggested here:
protected void Application_Start(object sender, EventArgs e)
{
Response.Redirect("/HTML/index.html");
}
Same result.
Lastly, I created an App_Code folder with a RedirectHandler.cs file as suggested by Rion Williams's last suggestion (first link) along with his code and sure enough I get the same result.
"This web app has been successfully created" after publish but I see my desired start page after adding /html/index.html to the end of the url.
Understanding how basic this problem is I took extra care to exhaust as many google searches as I could find relating to the topic before asking this question. My first question on StackO so my reputation is too low to link each page I found. My next attempt is to just start a brand new MVC project and painstakingly rearrange every single file that way. I'm confident that will work but I didn't want to leave this simpler method without learning from what I did wrong especially when I know the answer is going to derp-slap me in the face.
Have you tried to configure the default document under the configuration tab for your website in Azure portal?
With a lot of changing file locations around, clearing cache, and rebooting to avoid server and runtime errors, #hernandgr had the simple option I hadn't known about (shame on me) and funny enough couldn't successfully google about.
It turns out that I didn't need to do any of the steps I had tried to configure the start page beyond just changing it in the configuration tab in the Azure Management Portal. I deleted the global.asax file and the App_Code folder completely, didn't need to touch the web.config in any way and didn't need to implement MVC.
One thing to be noted was that making index.html my start page through Azure seemed to push it up a directory so my CSS, JS, LESS, fonts, and images folders had to be moved up as well to display the page properly.

WebBrowser not loading my page

I have a WebBrowser element in my UI, I can make it navigate to a hosted page, but when I want it to load a local webpage (which is in my solution resources), which is the exact html file hosted on internet, it just shows a blank page.
browser.Navigate(new Uri("test.html", UriKind.Relative));
If I change the UriKind or the page name it shows an error that the file could not be found, so I know the browser is finding the webpage correctly but it won't render it.
I need to do this because I want to show the page while the user is offline.
If the html file has a build action of Content you can access it directly from the install location if you set a relative path.
If you want to be able to navigate between pages or include other resources in the file (including external css, js or even images) then you'll either need to copy all the files to IsolatedStorage and view them from there or host them externally.
Edit:
MSDN has an article which explains copying files to IsolatedStorage, so they can be viewed in the WebBrowser control, at http://msdn.microsoft.com/en-us/library/ff431811(v=vs.92).aspx
The browser cannot read a resource from your App/Dll. However, it you have the file in the same folder as you application you could do:
var home = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
browser.Navigate(new Uri("file://" + home + "/test.html");

Categories