Quantcast
Channel: Configuration and Deployment
Viewing all 3561 articles
Browse latest View live

.Net application post development process on client side

$
0
0
I've been asked to create a school management system and it should work without an internet connection on the client side. The client does not want something that has to be installed on each and every system so I believe it would be accessed through the browser. So I would like to know the process of making the application and its database work on client side without internet. There will be multiple users who will use the application. One more question, because the application doesn't require internet would an asp website be okay for this project? Also what's the difference between deploy and publish in .net? I did go through the google answers but they're quite confusing. Database: MS SQL
Thank you!

How to exclude from VS2017 web publish specific folders?

$
0
0

Hello,

In my specific - weird - use case I have some static files on my backend project wwwroot/images subfolder.

Whenever I web publish I want to ignore my local wwwroot/images folder and avoiddeleting/overwriting the existing folder on the web server.

Basically, I want the images to stay on the server and avoid storing them locally. What's the easiest way to accomplish this?

Webdeploy to skip a subfolder folder in the web sites directory?

$
0
0

I cant hard code this because this needs to be reusable for all my apps.

I have a dir under the sites virtual dir named "notocar"

Im using this command to deploy (need to wrap skip in quotes to pass to cmd):

mypackage.deploy.cmd /Y -allowUntrusted /U:mydom\user /P:"sdlfkjsdlkfjsldf"/M:server -enableRule:AppOffline"-skip:objectName=filePath,absolutePath=.*notocar*"

This is not the right syntax because its still syncing that folder.

Whats the right syntax to ignore a subfolder?

============= Other things I tried:

This actually works, skipping this one file "-skip:objectname='filePath',absolutepath='Web.config'"

These args dont working (the folder is still deleted):

"-skip:objectname='filePath',absolutepath='notocar'"

"-skip:objectname='filePath',absolutepath='\\notocar'"

This seems to skip almost everything EXCEPT my folder:

"-skip:objectname='filePath',absolutepath='.*'"

It looks like because the notocarfolder doesnt exist in the package it deletes it every time? If I specify a folder that does exist in the package it leaves it alone. I dont want to create a logs folder just to get this to work. How do I ignore this folder? Also, enableRule:DoNotDelete is not going to work because I want it to delete everything except this one folder

New Website Project Template Missing in VS 2017

$
0
0

I have searched for this issue in the forums and came up with 14,000 unsorted hits which I am not going to plough thru...

I am running Visual Studio 2017 Professional edition Version 15.8.4
My version of VS used to have the option to create a new website i.e File --> New --> Website
This provides the opportunity to select Local IIS as the web server, as opposed to IIS Express built into VS.
I want this because I can just copy modules up to Production thru Website --> Copy Website. I can also link remotely to my development website.
Now this seems impossible.

I have tried File --> New --> Project --> Visual C# --> Web --> Previous versions --> ASP.Net Empty Website.
This still does not give you the opportunity to select Local IIS as the server. 
Worse still, there is no available option to change the server from inbuilt IIS Express to local IIS.

My websites run on an intranet behind a firewall, and don't need complex publishing options. I just need to copy the modules to prod.....job done.

Thanks for considering.

Josemvsr

$
0
0
configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Copy ASP.NET WebForm Website with SQL Database

$
0
0

Hi I did a project for college where I had to design and create a Auction Website using C# ASP.NET Webform with a SQL Database Connected to store all the data from the website.

What I want to know is how do I copy the Website with all the pages and the SQL Database to hand it in for my college.

Do I need to publish it or is it just copy and paste or is there something specific I need to do?

I did copy and paste the Database and website to my laptop but the problem then was the database didn't work and my SQL on my laptop also didn't want to read he Database, this is why I'm asking for help.

Any help would be really appreciated.

HTTP Error 500.21 - Internal Server Error Handler "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list

$
0
0

hi guys

I just uploaded my asp.net core 3.0 site to my IIS hosting environment, and in the applicaiton pool, I set it up with no managed code. However when I try to browse it, I get the error 

HTTP Error 500.21 - Internal Server Error
Handler "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list

I have downloaded and installed asp.net 3.0 SDK for 64bit found here https://dotnet.microsoft.com/download/dotnet-core/3.0

What am I doing wrong here ? thanks

Ehi

ASP.NET hosting project does not load css and other image files

$
0
0

hi guys

I just deployed a new asp.net core 3.0 project, but it seems most of the files are not loading, e.g. the boostrap, css files and lots of images. (AS the website is all over the place)

I looked through the project (root solution) and included them in my project. (Deleted the entire solution online and re-published it again and again ) even restarted VS.

But it did not change the problem

Here is a browser tools. Any advise ?

Failed to load resource: the server responded with a status of 404 (Not Found)
icon_le.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Basket.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Upload.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
HB013.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
HB011-1.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
HB034.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
cupid.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
icon_flag.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
heart.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
totb.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ze.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
 e.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
memories.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
dropdown_menu_samples4_2.png:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
site.css:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
giphy.gif:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
bible.png:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
site.js:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
dropdown_menu_samples4_2_2.png:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
men.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
women.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Icon_Send_Gift.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
(index):524 Uncaught TypeError: Cannot read property 'addEventListener' of null
    at (index):524
/favicon.ico:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
site.css:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)


IIS Express self signed certificates.

$
0
0

Hi, I am making a web application and it needs to run under SSL.

For that reason, I have switched in Visual Studio the option SSL Enabled.

 Once I did that I got the following dialog box asking me if I want a self-signed certificate by IIS Express

I replied with Yes and  IIS Express generated a self-signed certificate that it has been added in my personal certificates, i have moved the certificate to Trusted Root Certificates as shown below 

 

Once I did that everything worked as expected !!!
I have to mention that at the time I have runned the following code : netsh http show sslcert 

and I have seen that IIS Express made bindings to the ports 44300 until 44399 

below are partially shown the results of my query 


Now the fun part starts, suddenly my pc shut down from kernel 41 error (probably a problem with my PSU (this is another story :) ))
when the computer restarts I try to use the SSLURL but I get the following error: ERROR_CONNECTION_RESET - the site does not even loads.

Therefore, I  re-run the command: netsh http show sslcert

this time I only got one binding as shown below :

Since my SSL website has a binding on a port between 44300 - 44399 the above binding is useless therefore i think I found why my SSLURL is not showing up.

Moving forward, I have decided that I have to manually bind the previously generated SSL certificate to the port that my website uses for this example lets say port 44314.

therefore I use the following command from CLI: netsh http delete sslcert ipport=0.0.0.0:44314

Once deleted the entry succesfully I tried to make a new binding using the following command :

netsh http add sslcert ipport=0.0.0.0:44314 certhash=7d5ca4a11949712b0a24685a13066f9c29c9c9ef appid={214124cd-d05b-4309-9af9-9caa44b2b74a}

Certhash and Appid are the ones' used before by IIS Express for my certificate.

I received the following error: 

SSL Certificate add failed,Error:1312
A specified logon session does not exist. It may already have been terminated.

I don't know how to move forward and I need my site to run on SSL (in the development environment). I have disabled and re-enable the SSL Option from the visual studio hoping to get again the message shown in the second picture of this post. Unfortunately IIS had never asked me again for a new self-signed certificate.

Ps: I have tried to repair IIS in an effort to recreate the bindings but that has not helped either.

Ps2: I tried the following command : IisExpressAdminCmd.exe setupsslUrl -url:urlofYourSite -UseSelfSigned  but is not working

Do I need to set up a FULL IIS?

can't browse ASP web app on new server

$
0
0

I can't browse my web app on my new AWS EC2 virtual Windows Server 2016.

I setup IIS and created my web site and added bindings for my URL.
I used VS2019pro and published web site.  Publish > validate was OK.    Publish was successful.

But url won't browse.

Went to IIS > web site > right-click Manager... > Browse ...   won't browse.

Restarted Windows...still won't browse.

publishing targets looking for wrong Web.config full name

$
0
0

Hi,

I am trying to publish a WCF service on my local machine in a folder. I am getting the below error when I try to publish - 

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(1482,5): Error : Could not open Source file: Could not find file 'C:\XXXX\Api\Api\Web.config;web.config'.

The config is present without the additional web.config at the end - 'C:\XXXX\Api\Api\Web.config;'.

Does anyone has any clue why is the config name not fetching correctly?

Thanks,

Rohan

ASP.NET page Java Script and Scipt Manager alert not working in WINDOWS SERVER IIS

$
0
0

I am installing new windows server 2008 and configure my ASP.NET application.

The problem i am getting, i am not able to receive any popup alert and fired any event in my ASP.NET application.

But, the same application is working fine in other server (i mean the popup is throwing).

What change i have to do in IIS...?

Unable to download word files

$
0
0

We have hosted an asp.net (C#) application on the iis 8.5 server. 

The application  is used to download or preview word files and are working file for a while. But then it stopped after the restart.

normally when this happen we just close all instance of the word file and iis then it seems to start working. But today it stopped even after restarting.

Here us the code snippet for previewing the document 

if (result != "FALSE")
{
lblMsg.Text = "CV Created for " + EMPNO;
System.IO.FileInfo file = new System.IO.FileInfo(result);
if (file.Exists)
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name);
HttpContext.Current.Response.AddHeader("Content-Length", file.Length.ToString());
HttpContext.Current.Response.ContentType = "application/vnd.ms-word";
HttpContext.Current.Response.WriteFile(file.FullName);
HttpContext.Current.Response.End();
}
}

Code snipet for downloading the document 

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.BufferOutput = false;
//System.Web.HttpContext c = System.Web.HttpContext.Current;
string archiveName = String.Format("EmployeeCV-{0}.zip",
DateTime.Now.ToString("yyyy-MMM-dd-HHmmss"));
HttpContext.Current.Response.ContentType = "application/zip";
HttpContext.Current.Response.AddHeader("content-disposition", "inline; filename=" + archiveName);
using (ZipFile zip = new ZipFile())
{
zip.AddFiles(filesToInclude, "KEOCV");
zip.Save(HttpContext.Current.Response.OutputStream);
}

HttpContext.Current.Response.End();
HttpContext.Current.Response.Close();
Directory.Delete(saveLocation, true);

Any suggestions are welcome. 

App_GlobalResources skips only one resource file while publish

$
0
0

Hi All,

I my MVC project there is a folder App_GlobalResources which having 6 resource files for different language purpose.

The issue is when I try to publish is on  Azure devops, only last file Resource.resx doesn't reach there and remaining 5 files reaches without any issue.

Please suggest.

Web Project on aruba

$
0
0

Hi, i have some trouble on publish my ASP .Net Mvc project on a web hosting of aruba, can someone help me?


SubFolder Web.config is not working

$
0
0

Hi Currently we have Web.config, Web.QA.config , Web.Prod.config under asp.net application project and also we do have Web.config in subfolder. Depend upon the properties it reads data from subfolder specific Web.config. But now due to some requirement instead of Web.config we are setting up Web.QA.config and Web.prod.config to APP_CONFIG_FILE depend upon the environment  and put this logic to Application_Start method in Global.asax . So now every time instead of Web.config we get the data from environment specific config file. But problem is we are not able to read data from subfolder specific Web.config. I added both  Web.QA.config , Web.Prod.config in same subfolder but still not working. So please help me to get data from subfolder specific config file.

Subfolder web.config problems

$
0
0
Hi all, I'm having a problem with setting up my web.config files in subfolders (or using the tag). At the moment, my filesystem structure looks like this: application root [setup as an application under IIS] | |> admin[subfolder] | | | |--> index.aspx | |--> login.aspx | |--> web.config | |--> index.aspx |--> web.config |--> global.asax |--> AssemblyInfo.cs (Note: Currently, every file is simply a freshly created file. I've done NO editing at all to any of the files) I get the following error when trying to view the index.aspx page underneath of the admin subfolder. ===================== 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. ===================== Now, reading that would say I need to setup the admin subfolder to be an IIS application. First, I've never had to do that in the past (I've recently rebuilt my workstation). Second, when I do make the admin subfolder into an IIS app, it causes another error. I get this: ===================== Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'cpxAppTest.admin.index'. Source Error: Line 1: ===================== Any ideas for my problems? I've searched and searched, all I've found was something that said make the admin folder an IIS app. I've tried that, to no avail. I'd appreciate all help I can get. Thanks in advance! Chad

Assertion at debugger-agent.c:1648, condition `*endbuf

$
0
0

I have a project on ASP.NET Web API 2, and working on it with Rider (2018.3.4). I tried to debug it, but the mono xsp4(which is the server used to host the API locally) server is crashing ... Here is the log link

https://pastebin.com/b8rerDL8

Expect-CT header

$
0
0

Hi there,

I'm thinking about adding Expect-CT header to IIS 8.5. I'm confused about report-ui. What kind of script/ reporting code I need to write in the web application to receive reports. I read they are received as POST. 

Can someone give me a simple example?

Joe

HTTP Error 502.5 - Process Failure

$
0
0

Hi,

I have an asp.net core 2.1 MVC application. I am trying to deploy it to IIS 8. I tried those (https://www.danielcrabtree.com/blog/400/how-to-fix-iis-http-error-502-5-in-asp-net-core) but still getting this 502.5 error. What is missing?

Best Regards.

Viewing all 3561 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>