Visual Studio 2015 IIS Express not loading assets such as CSS, JS, Images - visual-studio

I have a project, I build it in VS2015 and hit ctrl+F5 to start without debugging and launch the site in browser.
However non of my css, js, images are loading in chrome and edge?
In browser console I see:
GET http://localhost:2195/Content/app.css net::ERR_ABORTED 404 (Not Found)
In my layout file have the above defined as follows:
<link href="#Url.Content("~/Content/app.css")" rel="stylesheet" type="text/css" />
Below is what I have in the properties box of the development server:
Development Server
Always start when debugging: True
Anonymous Authentication: Disabled
Managed Pipline Mode: Integrated
SSL Enabaked: False
URL: http://loaclahost:2195/
Windows Authetication: Enabled
Any ideas as issue is only in browsers where i'm asked to enter my windows credentials?
When I enter the http://localhost:2195/Content/app.css directly in browser i get 404 error:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:2195/content/app.css
Logon Method Negotiate
Why is the logon method showing as negotiate even though I've setup authentication to windows both in web.config and in the dev server?
* Update *
Installed jexus manager and added connection to site. Under actions > manage website, when i click start I get the following error see attached pic.
When I click on browse website I get dialogue saying this website is not running do you want to start it now. When I click yes I get the same error above and when I clikc ok on the error above I'm redirected to the site in browser and I'm able to navigate the site on localhost.
This is the report generated not much info that i haven't already provided before:
Scan the folder U:\Visual Studio 2015\Projects\MyProject\MyProject for project files.
1 project(s) are detected.
* MyProject.csproj
Project file: U:\Visual Studio 2015\Projects\MyProject\MyProject\MyProject.csproj.
IIS Express configuration file: U:\Visual Studio 2015\Projects\MyProject\.vs\config\applicationHost.config.
Analyze ASP.NET project.
Extract web project settings.
UseIIS: True
AutoAssignPort: True
DevelopmentServerPort: 2195
DevelopmentServerVPath: /
IISUrl: http://localhost:2195/
NTLMAuthentication: False
UseCustomServer: False
CustomServerUrl:
SaveServerSettingsInUserFile: False
UseIISExpress: true
IISExpressSSLPort:
IISExpressAnonymousAuthentication: disabled
IISExpressWindowsAuthentication: enabled
IISExpressUseClassicPipelineMode: false
UseGlobalApplicationHostFile:
Scan all bindings.
IIS Express is used for this project.
Binding localhost on *:2195 (http).
A matching binding is found for http://localhost:2195/.

Related

WKWebView in Blackberry Dynamics iOS app cannot save cookies

We have a Xamarin.iOS app which uses the Blackberry Dynamics SDK. (v11.0.1.11)
In this app we show a WKWebView, which loads a page that uses cookie based authentication. The problem is, that cookies seem not to be correctly saved. During loading of the WKWebView I see entries like this in the console output:
2023-01-17 13:16:34.765 MyApp[1110:277171] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/7FB9EDEF-FB4A-4E7B-A8B0-E02C209D1F20/Library/Cookies/Cookies.binarycookies
2023-01-17 13:16:34.779 MyApp[1110:277171] could not create directory "/private/var/mobile/Containers/Data/Application/7FB9EDEF-FB4A-4E7B-A8B0-E02C209D1F20/Library/Cookies" for future sandbox extension, error Error Domain=NSCocoaErrorDomain Code=516 "The file “Cookies” couldn’t be saved in the folder “Library” because a file with the same name already exists." UserInfo={NSFilePath=/private/var/mobile/Containers/Data/Application/7FB9EDEF-FB4A-4E7B-A8B0-E02C209D1F20/Library/Cookies, NSUnderlyingError=0x28237d8f0 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}
Then when the WebView loads it gets a "401 - Unauthorized" from the server because (I assume) the cookie is missing. Doing the same in our version of the app not using the Blackberry SDK we do not get this log entry and the page loads without problems. Any idea why cookies cannot be saved in the Blackberry version?

Blazor app not running server code when on hosted server

I have a blazor web assembly app and I have 3 projects that were created. The client, server and shared. I assume all of these are deployed as standard when using the webdeploy?
The site works in that it displays the pages etc. However when I go to a page that contacts the server project via the Http.PostAsJsonAsync() method, I get the blazor error page (which I setup to say "oops").
Obviously I get no details as to what is going wrong. So I have no idea what is happening. Is the server app compiled into the Web assembly app? If so why would it not be running the server code? Plus I suppose the other question is how do I get it to report the error so that I can get an idea as to what is going wrong?
It works absolutely fine when running it through Visual Studio.
This is the first time I have deployed to a hosted server so there is a very high chance I have done something wrong...
The method I am calling literally does nothing other than returning a 200 message. So I assume the issue is with calling the server method itself.
Firstly, use Logging:
https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/logging?view=aspnetcore-5.0&pivots=server
#inject ILogger<MyComponent> Logger
Then wrap your Http.PostAsJsonAsync() call in a Try Catch block.
Log the error in the Catch block:
try
{
await Http.PostAsJsonAsync()
}
catch (Exception e)
{
Logger.LogError(e);
}
After deployment, edit your web.config file:
<aspNetCore processPath="dotnet"
arguments=".\Hospitillity.App.Server.dll"
stdoutLogEnabled="true" // <<< MAKE THIS true
stdoutLogFile=".\logs\stdout"
hostingModel="inprocess">
Note, the setting stdoutLogEnabled="true". This will cause your hosting provider to generate log files.
Then recycle your app pool on your hosting provider.
Connect to your website again, and after the error you should have some more details about error logged in
\logs\stdout_nnnnnnnnnnnnnn_nnnnnn.log
on the hosting server.
Take it from there ...

react-native VS android emulator chrome debugger error "Cannot set property 'volume' of null"

I am trying to debug react-native app running on VS emulator in chrome. The error I am getting at the moment is "Cannot set property 'volume' of null". It is like 4th or 5th cryptic error I am getting since starting, but the first one when I hit the wall. I will outline all configuration steps in case I botched something earlier:
Initialized project with react-native init myapp
Started the bundle server with react-native start --host 192.168.100.4 (the reason for host parameter is CORS error)
Started the app with "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android" (the reason for react-native bundle command is assets error)
On emulator went to shake -> Dev Settings -> Debug server host & port for device, set it to 192.168.100.4:8081 (the reason for that is "cannot connect to bundle server on localhost)
shake -> Debug JS Remotely
Chrome window opens, I hit F12. Now it still displays CORS error for a while, but after some page refreshes it displays "Cannot set property 'volume' of null" and sticks to it:
(index):94 Uncaught TypeError: Cannot set property 'volume' of null
at Object.render ((index):94)
at Object.setState ((index):48)
at WebSocket.ws.onopen ((index):152)
Just in case, here is CORS error that I get initially:
Failed to load
http://localhost:8081/index.delta?platform=android&dev=true&minify=false:
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://192.168.100.4:8081' is therefore not allowed
access. If an opaque response serves your needs, set the request's
mode to 'no-cors' to fetch the resource with CORS disabled.
(index):188 Uncaught (in promise) TypeError: Failed to fetch
It goes away after page refresh, but I wonder why it still happening.
Did anyone manage to setup Chrome Debugging with VS emulator and react-native? If so, please share your experience, all tutorials I found just happily advice to run react-native start and react-native run-android and everything should be smooth ride after that )
I had a similar issue with the debugger mode and was getting an error.
I am not sure of the WHY? to that answer but the extensions in the chrome might be the problems. I disabled the extensions and I didn't get any of the errors post that.
Open the application
Select DevSettings
Choose Debug server host & port for device.
Type your system ip address along with the port number of the metro
builder.
For getting system ip address.
Open command prompt
Type ipconfig
Select ipv4 address

CKFinder - 404 Error when attempting an upload

I set my CKFinder/CKEditor integration as follows:
var editor = CKEDITOR.replace('editor11');
CKFinder.setupCKEditor(editor, null, { type: 'Files', currentFolder: '/archive/' });
The CKFinder popup displays and I go to the upload tab and am able to select an image. When I click "Send it to the Server" I get the following error:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that
it is spelled correctly.
Requested URL: /ckfinder/connector
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.7.2110.0
I get a similar error when I click "Browse Server" on the Image Info tab. I see nothing else in the documentation that is required. Please help me to solve this issue
Edit:
Adding connectorPath fixed it. The path is different on our DEV server than my local machine, where it works already.
CKFinder.setupCKEditor(editor, {
connectorPath: '/brainsbeta/ckfinder/connector'
});

CRM 2013 script error Network Error 0x2eff

I'm using CRM 2013 OData services and I'm getting expected result but when I open javascript console on IE 10/11 under errors
Script7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.
I'm not using jquery.
Please suggest
its on On-Premise, http, AD, Lead entity, in all browsers. I'm using Rest Odata SDK
var options = "$select=Telephone1&$filter=AccountId eq guid'" + regardingObjectId + "'";
SDK.REST.retrieveMultipleRecords("Account", options, retrieveAccountsCallBack, errorCallBack, accountsRetrieveComplete);
i had same problem with using jQuery Ajax request.
And i found solution for my issue.
This is IE security restriction, you can set security goto Browser Property(Configuration) then security, then you can add site that you needed to intranet sites or you can switch internet security lower than normal(middle) mode, then restart all IE bookmarks and must work
(sorry if some menu items have other name that i wrote, i use localized version and i don't now it english name)

Resources