deploy ABP framwork angular into iis - asp.net-core

I want to deploy ABP angular Application into IIS I don't know how.
I created a folder contain the backEnd Folder And The FrntEnd Folder then i build the frontend into the frontend Folder and in the visual studio, I publish the backend into the backEnd Folder
in IIS I created a website with the backEnd with HTTPS and inside the Website I created a App contain the frantEnd
the App works and the data appears in the list
but in create and update method not function
I look inside the log

It looks like you haven't changed the application settings.
https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json
https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json
You need to change application ports, URL. etc

Related

Blazor wasm not serving static files from wwwroot after deploying to IIS

I'm developing a .net 5.0 blazor wasm application. When I run the app form visual studio using IIS Express and navigate to https://localhost:5001/docs/simple.pdf, the file is served in browser.
However the same does not work after deploying the blazor wasm app to IIS. I'm not getting any error instead my Not Found Route template screen gets loaded.
Here is the screen prints:
wwwroot of blazor wasm app:
IISExpress loading the document:
IIS virtual directory path:
IIS not loading the document and display NotFound Route template:
I also noticed none of the files in wwwroot is not directly accessible in browser in IIS. Please assist on what I'm missing.
Blazor WebAssembly is not involved in serving your files.
This is something to configure in IIS.
This seems to be an issue with service-worker.published.js file coming with blazor wasm pwa template. This has been reported in dotnet/aspnetcore repo.
Please follow the issue in github for more updates.
I was able to reproduce your issue. Here is how I think you can fix it.
Navigate to the Server project inside your solution.
Open the file Startup.cs. Navigate to the Configure method and add this line of code:
app.UseStaticFiles();
Publish your project and recopy to IIS.
In the default Visual Studio template, this code will be there. But depending on how you created your solution, maybe you missed it.

ASP.Net Core 2.0 IIS Express SSL Client Certificate Prompt on Static Files

Environment/Frameworks:
Windows7
asp.net core 2.0 application running in IIS Express in VS2017
IE11, Edge, Chrome
Background:
I have and Asp.net Core 2.0 MVC application that I want to run in such a way that I get prompted to pick a client certificate in order to access the application. In my local computer for testing purposes, I have created a sample fake self-signed certificate as per this article http://dcdevs.blogspot.com/2017/06/iis-express-client-certificates.html, and I have configured my asp.net core 2 application in VS2017 by going to project Properties -> Degub Tab, and checking Enable SSL, then copying the generated URL to the App URL text box.
On the Startup.cs or Program.cs I have NOT added any settings to required SSL, which means to my understanding that IIS Express is serving as proxy to require https then forwarding the requests to Kestrel in a regular http request as per this post ASP.NET Core + IIS + SSL
All in all, when I run the application I get prompted to select a certificate, then I am able to read the certificate and extract information out of it inside a controller. The application comes up, and I can see everything on the Home page with its banner image, but I cannot see the images that are retrieved from a javascript file and then placed on the page with DOM manipulation. This happens in IE11, and Edge, but Chrome just works fine.
Problem:
When I load a page I get prompted to select a certificate and then the page opens, but any javascript that make subsequent requests to load images (static files) hosted on the same application under wwwroot also gets prompted. When I hit F12 and monitor the network calls, this request to static files appear as Aborted in EI11 and Pending in Edge. If I open a new tab and copy the image url, I get prompted for a certificate the first time. If I navigate to different links on the application which invoke other controller's actions the pages just display fine, the main banner image of the site still displays fine. It is just the calls to static files (e.g. images) that cause the prompt for certificate to appear again. As I described above I don't have this problems when I run the application in Chrome.

how to host webapplication and webapi in single solution

I created a solution with two webapplication project. One is asp.net mvc and second one is web api. Now I want to publish. Kindly suggest me how to publish my webapplication and webapi
all mvc pages, web api controllers and aspx pages can be added to single project, no need to different project, if you need to seperate business you can use areas and class libraries
Process 1 :
You don't need to create separate project for Web API and MVC application in a single solution. You can create a MVC application and add an WebApiConfig.cs (route for api) file in App_Start folder. Write the route for API,(you just need to copy your route from Web API project and paste here). Now you can add/keep your all Api controllers in Controller folder which must be inherited from ApiController. That's it!
Process 2 :
But if you want to keep in separate project in a single solution,
then right click on your solution -> click on properties -> It will open property page. Here select the Multiple Startup projects radio button -> Then you can set both MVC and Web API application as start in action column -> Click on Apply -> Then Ok.
Suppose your Domain name is example.com. Then you can publish your MVC application there. And create a sub-domain, for example, myapi.example.com, and publish your API there. Then enable CORS on API project.
I would recommend to go with Process 1.
If you want to know more about how to publish both project from a single solution, please check this link

How to upload file directly to MVC4 web application

I have this MVC4 web application that does CRUD actions for my database. Now I need to upload log files from native mobile application to database. Since it upload log file directly from mobile application code, it does not use RAZOR web page. I'm not sure how to set controller parameter to accept log file. Please give me some hint!

mvc4 app, hide iis application name?

I have a mvc4 application deployed to IIS7.5.
The Website is mapletest, the application is Budget2013,
so users access the site, mapletest/Budget2013.
What do i need to do to allow users to access this by just using mapletest?
Also, mapletest/Budget2013/ShoppingCenter should become mapletest/ShoppingCenter.
Basically I want to hide the application name in the url.
You should deploy directly your application to the root website and not using a virtual directory. So for example if your mapletest WebSite physical directory is c:\inetpub\wwwroot\mapletest that's where you should deploy your application.