Thank you!
Thank you!
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?
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 notocar
folder 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
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.
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.
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
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)
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?
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.
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
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...?
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.
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.
Hi, i have some trouble on publish my ASP .Net Mvc project on a web hosting of aruba, can someone help me?
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.
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
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
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.