package.json file not found in web application on Azure - reactjs

We are moving a webforms application, primarily .NET 4.7.2, into Azure. A number of ASPX pages incorporate React sections. All works fine in the current Windows Server environment and running through Visual Studio, but when running in Azure, the package.json file cannot be found even though the file is in the correct location. Information that I've found indicates that this may be due to missing handler mappings. I have found a number of solutions that indicate adding settings in the web.config file may solve the problem:
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json"/>
</staticContent>
However, this makes no difference; a 404 error is still returned.
Our Azure knowledge is minimal, but perhaps it would be better to add the handler mappings in the Azure portal? If this is the case, what should be entered as the script processor?
Any help will be welcome!

If you haven't already tried this, try restarting Visual Studio. Then, from the build menu, hit 'clean solution,' and then 'rebuild solution.'

Related

IIS Shared Configuration Webfarm - Error when dynamically updating bindings

First time posting a question so apologies for anything I'm doing wrong.
I have a webfarm of 4 IIS servers running windows server 2016 which uses an azure file storage account for its webfiles. It also save its shared configuration files to the same azure file storage account. This webfarm is then behind an azure load balancer.
Everything works fine, until part of the website code adds an IIS binding. This then causes all the servers to display the error below:
Could not load file or assembly 'EntityFramework,...etc" The parameter
is incorrect. (Image attached for full error).
The only way to resolve this error is to clear the asp.net temporary files from the C drive of all the servers and run IISRESET on each box.
Any ideas?
So this was a mystery but the following changes have resolved the issue. I'm not sure which combination has fixed it, but this might help someone who has a similar issue.
Recreate website in IIS using new App pool.
Removed individual IIS bindings and replaced with wildcard (we had a really old-school system before where we had 100s of binding, maybe one of these was corrupted).
Thanks for your help!

setting up asp application on hosting provider changing

i have never worked on windows iis, asp and mssql but now i am forced to do so.
the plot:
i have an asp mvc application (the exact folder tree copied from the old disabled server) and an mssql backup file (.bak). I have managed to restore the database and i have copied my application folder to httpdocs. BUT still...when i try to access the server it pops lots of errors. i know, lack of knowledge and app setup.
my question, in what order should i start setting up my app (what files, what settings..etc for a complete windows noob); i have no start point, i'm confused, put me on the track please. Any advice will be appreciated, any reference.
Keep in mind that i have advanced knowledge in apache server, php, mysql, html, css, javascript BUT ABSOLUTE ZERO in IIS,mssql,asp :D
PS: it's kind of urgent! and i have to learn as i go.
What kind of errors are you getting?
is an code error? or what?
in my experience, when you get a new windows hosting, or server, sometimes you need to activate .asp pages, since it reads only aspx by default, also, to see the code line errors you need to configure that, because normaly the errors are hidden.
to show errors on a server, you go to control panel, administrative tools, IIS, and then somewhere is the option to show errors on browser.
If you are in a hosting with plesk there is also an option to enable .asp pages and to show errors on browser.

deploying WPF application to IIS: "Deployment and application do not have matching security zones."

I'm attempting to deploy a WPF application to IIS. After copying the files to the server, when I attempt to download and run the .application file, I get an error:
Application cannot be started, please contact the vendor.
The detailed log shows the error:
Deployment and application do not have matching security zones.
I noticed someone else had a similar problem a while ago.
Can anyone help?
This error was due to me copying the wrong root path up to the web server. I copied the entire "Release" folder to my target URL, but I needed to copy just the app.publish sub-folder.
I encountered a couple more problems on the way:
My deployment included some files in the App_Data folder. IIS7 was blocking this, and I needed to remove "App_Data" from the "Hidden Segments" of "Request Filtering".
I started seeing an error "my.dll already exists in some-random-temp-folder". I just excluded the DLL from my deployment files. I think it had already been marked as "prerequisite".
There's an excellent answer here that provides instructions and some context.

Installation Error in DotNetNuke

I am new in dotnetNuke. I am trying to install DotNetNuke_Community_05.06.02_Source.zip file.Firstle i extract it to C:\DotNetNuke. There is a release.config file created in C:\DotNetNuke\WebSite\ . Renamed it as we.config. There is another we.config file in C:\DotNetNuke\DotNetNuke_Community_05.06.02_Source\Modules\RazorHost\ renamed it to web1.config. I configured it in IIS6.0 .Created a Database in SQLServer2005 named -DotNetNuke.Changed the connection string as directed by the installation guide. When i am trying to open the installtion wizard through browser it shows an error
Server Error in '/' Application.
Configuration Error
Description: An error occurred during
the processing of a configuration file
required to service this request.
Please review the specific error
details below and modify your
configuration file appropriately.
Parser Error Message: It is an error
to use a section registered as
allowDefinition='MachineToApplication'
beyond application level. This error
can be caused by a virtual directory
not being configured as an application
in IIS.
Source Error:
Line 56: Line 57:
Line 58:
validationKey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902"
Line 60:
decryptionKey="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902F8D923AC"
In order to use the source package you must compile the code in release mode before attempting to access the website.
Being new to DNN, I recommend starting with the install package which will not need compiled, or even easier, you can get DNN through the Microsoft Web Platform Installer. WPI will also take care of all the dependnacies that may need configured on your computer.
I'ld like to clarify the intention behind downloading the Source Package. Were you intending to start developing and changing the dotnetnuke framework to suit your needs or did you want to set up a website that you could build modules against on IIS?
If you're intending to develop modules, I'ld suggest downloading the Install Package, creating an IIS site under Default Web Site.
- There's no need to change connection strings if you're using the database file that's in the App_Data folder.
- All you need to do is set the Folder Permissions for Network Service or IIS_IUSRS based on what application pool you're running.
- The url to the site will be http://localhost/xxx.
There are 2 ways to build modules in DNN. The Website Project and the Web Application are two different ways. They produce source code and dll's respectively. If it's internal, any way's good. If it's external facing, you might want a little bit more speed, so go Web Application.
However, If you're intending to muck around with the DNN Core Framework and adjust things, the Source is the way to go. there's no need to adjust the settings, just open the website project up in Visual Studio and away you go.

ClickOnce incorrectly detecting newer version form server

I have a ClickOnce application that checks a server for a new version on startup.
I recently deployed a new version (2.0.0.0) whilst leaving the old version (1.9.9.9) on the server.
On startup version 2 will inform the user that a new version of available and download 1.9.9.9.
Is there a reason this could be happening? I assumed that ClickOnce would look at the version numbers alone when deciding if a version was newer or not.
Thanks
EDIT - this is the publish version
EDIT TWO
Thanks for the replies guys.
The app is published by visual studio. It has placed a .application file in the root which contains info such as the following:
<assemblyIdentity name="CokeAudit.application" version="2.0.0.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" />
The .application file that exists on the server (which I havent updated to the new version yet) contains a .application file in the root which contains details such as:
<assemblyIdentity name="CokeAudit.application" version="1.9.9.9" publicKeyToken="4c4bf139090ca52a" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" />
The only thing I can see that is different, aside from the version number, is the public key info. Could this be due to the fact that between version 1.9.9.9 I had to disable the signing of the application as the certificate expired? Would this cause the upgrade issue?
I did not, at any stage, sign the app with an actual 'proper' certificate - it was always a test one generated by visual studio.
ClickOnce does not look at the version numbers -- it simply looks at the application manifest file in the top level directory of your ClickOnce repository. This is important when, for example, you need to do an enforced rollback of a release.
Make sure the application manifest in the top level is the same as the application manifest in the 2.0.0.0 directory under Application files -- if it's not, just copy the manifest up to the top level.
How are you publishing your application? IF you are using Visual Studio, it will place the new deployment manifest (.application file) in the root; otherwise Richard Dunlap is right, you will need to do that yourself.
The other case where I've seen people have this problem is when caching is turned on on the webserver. (I think I've only heard of that with Unix or Apache servers.)

Resources