Is there any way to rectify Deployment Error while creating MVC application and trying to deploy the underlying database in Azure SQL Virtual Machine? - sql-server

I created One MVC application where Repos and Service Layer are implemented. and I tried to deploy the underlying Database in azure SQL Virtual Machine(IAAS) and application in azure App service(Web app) as PAAS. When I deploy it in the cloud, I got a deployment error on action methods where the repo layer presents. I tried to remove the repo layer and run it, then it perfectly works.
In the azure Log stream, it says,
"This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error."
I don't know how to debug the issue. I tried many things using the repo layer, but it didn't work on a remote system. Though It works on localhost perfectly, it shows a deployment error in the remote system.
here you can see my code in the GitHub repository "https://github.com/GSudhindra/Shopping/tree/master/Shopping".
I hope to get a possible solution here.

Related

CGI application encountered an error and the server terminated the process

We have hosted our SOLR service in our Azure Pass environment. We are getting the below error intermittently.
The specified CGI application encountered an error and the server terminated the process.
I have restarted the service and it is working fine. BUt it is coming again and again.
If you're referring to Apache Solr, I'm not to familiar with it's setup. But have a look at this answer which is regarding certificate loading. Your app may be trying to use an invalid cert.

.Net 6 App-Service won't connect to SQL in production

I have several sites hosted on the same App Service Plan - an S1 instance. All are using the same set out Outbound IPs. I have a SQL server VM where all the databases live. I have a network security group with an inbound rule for the S1's outbound IPs.
All my other sites work perfectly and have access to the SQL VM and their respective databases.
The site in question works perfectly when hosted from my local dev machine, WITH the production database.
Yet I get an Access Denied error: "SqlException: A network-related or instance-specific error occurred...] when I promote it to production on Azure.
All the usual suspects (firewall, user doesn't exist, etc.) can be ruled out because ALL my other sites are using the same database server, credentials, and the only change in the connection string is the Initial Catalog. They are all on the same App Server and all have the same outbound IP so if one was getting blocked the others would be also. If it were a user problem, it wouldn't work when hosted locally.
The only difference between this and my other web apps is that this one is Blazor, built on .Net 6. The others are on .Net Core 3.1 (LTS). I don't think that has any bearing since the application in question, when hosted locally works with the production connection string. This IS the first time I've published a Blazor app and .Net 6 app, so...
I'm sure I'm missing something silly, but I can't figure out why this one site would act differently than the rest.
Could someone please offer up another avenue for me to pursue? Or, a way to get a more verbose error message from the failed connection? Anything to further my troubleshooting?
For anyone reading this, I found my issue and it's unique to my project.
The truth, I separated the DAL from the presentation of the site. In the end, I was editing the wrong appsettings.json file. For three hours. Face-palm
My apologies if I wasted anyone's time.

Error publishing database along with web-app to Microsoft Azure in VS15

I am able to successfully publish my web-app without the database and it works perfect. But, since it is dynamic, I need to attach database to it but i am not able to do so.
It's raising an error when previewing database.

error creating application to be deployed with ClickOnce within our network via FTP

I am trying to set up an application to be deployed with ClickOnce within our network via FTP. I am using C# in Visual Studio 2012 update 3. In the Publish tab of the properties of the Winform app, I have a file share specified as the "Publishing Folder Location". The "Installation Folder" is blank as well as the "Update Location" in the Application Updates page. I have the "The application is available offline as well" radio button checked although I've tried it both ways.
The error message I get is:
Error 1 Failed to connect to '\servername\shares\DATA...\MyProjectPublishFolder\' with the following error: Unable to create the Web site '\servername\shares\DATA...\MyProjectPublishFolder'. Unable to create the Web site location '\servername\shares\DATA...\MyProjectPublishFolder'. Access is denied.
This implies it is trying to set up a web site. I was wanting to deploy via FTP. I cannot see any setting where I can specify FTP.
I found:
Trying to deploy clickonce app to FTP site but getting FrontPage Server Extensions not installed Error
but that fix didn't help. Any other pointers are welcome.
Ok, I was confused, The developer can "Publish" the application using a Web Server, an FTP Server or a file path. The user can "Download" the application using a Web Server, a File Share, or Removable Media (i.e.: DVD).

Migrating dotnetnuke from development to test server

I am a newbie with DotNetNuke and have been stumbling on how to deploy from the development server to the deployment server. For starters my development and deployment servers are one and the same machine. Here are the steps that I did:
DNN Setup
Downloaded DNN using WebMatrix.
Launched DNN and proceeded with the installation wizard, which is basically just testing the environment and then creating the DNN database.
After the wizard's installation launching DNN will now proceed to the Getting Started page
Added "localhost/dnn" in the site alias list
Moving to ISS
In IIS I added application (folder) DNN in the web root
I copied all the files from the original webmatrix path to the dnn folder in c:\inetpub\webroot making sure that the file/folder hierarchies are the same
Result:
When launching DNN using my browser I am directed to the installation wizard page instead of the Getting Started page. What am I missing?
Thanks!
Confirm that the permissions on the folder containing DNN are the same on your test server as they are on your development server. (I give Network Service read/write and IUsr Read/Execute)
Confirm that the application pool running your application has the proper identity (Network Service is suggested) and is running the proper .NET Framework version; based upon your question, I think you are set on this.
Gain access to your web.config file. You will see a ConnectionStrings section. You probably need to update the connection strings.
If your test server runs off of a different database than your dev server, figure out the connection string of your test server and update your connection string accordingly
You may be able to restore a .BAK file of your DB to your test server
If you do this, you will probably need to (in SSMS) edit your Portal Alias table to include the host name that you are using in your test server environment. Examples: Maybe you access the site via localhost/ on your dev environment, but you access to test site via test.Ronald.com? test.Ronald.com would be your PortalAlias
If your test server runs off the same database server as your dev server, it sounds like you need to open up access in firewalls so that your test server has connectivity to your dev database
A word of advice
Once you get it running, you will be making changes to each database separately (assuming your test site and dev site use different DB Servers). This sync issue can be a royal pain with DNN, as your page structures, module assignments, html module contents, installed modules/extensions will get out of sync. While restoring backups is nice, it is not a very good long-term solution. I recommend database-syncing tools
The problem is most likely a problem with DNN not being able to find the Database. If it can't find the database, it will run the wizard in order to create one.

Resources