Manage multiple pubxml files - web-deployment

I just created and published IISDeploy profile and it created IISDeploy.pubxml and successfully published my site.
Now I have 2 pubxml files in my solution:
IISDeploy.pubxml (mine) and
TMR.pubxml (old),
but when it tries to launch my site after publish, it uses the url in SiteUrlToLaunchafterpublish from TMR.pubxml.
If I manually pick my url and type in browser, it changes the address (redirects) to the TMR url.
How can I manage multiple pubxml files and from where do I point to the correct file.
Note: I will need to keep both of them in my solution.
Update
By the help of a colleague, it turned out that azure b2c login was involved and I did not have permission on a new url that IT admin had setup! So the site was not directing me to azure b2c login - but to TMR instead..doesn't make much sense though.

Related

Problem with local uploads to ASP.net website via CMS

I have a website built by ASP.net and have the admin web interface (mysite.com/cms) through which I manage the website content and upload local files from my computer normally. Since we migrated to another host, this feature stopped working and after I checked with the site developer he directed me to check the FTP permissions with the host, knowing that I can upload files using the FTP normally but this does not give me all the CMS page features. I returned to the host and he rest all the users permissions and I waited for some time for action to reflect but still nothing changed! I'm lost here and don't know what else could be the root cause for this problem since I have no experience in this field. May be worth mentioning that as a workaround we set the CMS to accept attachments or files as hyperlinks instead (to upload it via FTP and then insert the link (file path) in the CMS).

How can I change permission for an Azure Web App, so I can actually upload files via FTP to it?

How can I change permission for a Web App, so I can actually upload files via FTP to it?
What is it I need to change in order to have permissions to upload via FTP?
I have a running site that runs ASP.Net Core. Everything works.
For debugging purposes on a weird js issue, I need to be able to edit a few js files directly on the site via FTP.
When I connect via FTP (with the credentials from the "publish profile") I can connect just fine and download files - I use Filezilla.
But if I try to upload anything, I get "550 Access is denied."
I have full access to Azure Portal etc for the site, incl. Kudu.
It does not matter if you can upload files via KUDU or some other thing - I specifically need FTP.
Thanks for asking question! Could you please check if your firewall is blocked outgoing FTP writes.
Also, make sure you're not trying to write to a read-only file. For this suggest using the Kudu Console (https://[sitename].scm.azurewebsites.net/DebugConsole) to look at your files and check their permissions (e.g. using 'attrib' command).
For more information about KUDU, please refer to this document
Refer to this document link might be helpful: https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp#get-ftp-connection-information
Try checking the ftp link which is provided by deployment center, For this Go to your web app, click Get publish profile, choose the Publish URL under tag <publishProfile profileName="your-webapp"

HTML 5 audio with src to virtual directory with credentials

I have an asp.net application which does the following: loads data about audio files (file name, path and so on) from DB and shows them in table on the page. Application uses windows authentication (this cannot be changed).
I've added html 5 audio controls to my table cells so that users could play audio files without downloading them - actually, I don't want them to be able to download files at all.
Audio files come from two network-shared directories - one is accessible by all domain users, the second one is accessible only to specific user. Audio control requires the src to be a relative url - ok, fine, so I went to IIS manager and created two virtual directories under my application. For the second, highly protected directory, I'd set credentials which should have helped my application to access files.
Result seems quite strange to me: users see audio files from the first (accessible) directory preloaded and can play them; users cannot preload and cannot play files from the second directory with preset credentials.
Problem is definitely not in the audio src itself - it is well-formed. Seems like IIS is trying to access data in the second virtual directory under credentials of current domain user and not the one, whose login and password were set on folder setup.
Is there any way to overcome this problem? Unfortunately, granting access to this directory to all users is not a chance. Changing app pool identity to that same specific user also gave no results. App users and user account for the second folder are all in the same domain.
IIS access file via application pool identity not login user. So when you are running an application with network share directory, please change the app pool identity to a domain user that have permission to access both. Then you can restrict login user permission via authorization rule.

"You do not have permission to view this directory or page" when trying to upload a file

I have an ASP.NET project based on WebForms that was initially published on Azure server. Just recently I have made the website point to a different custom domain and since then I'm getting this error whenever I try to upload a file. I don't have this issue on my local server though. I'm using a jQuery library "pupload" to publish files. Just soon as I click the "select files" button, I'm redirected to a page where this error is displayed.
This issue wasn't there before so I figured this might me after I changed the domain. Can someone help me out with this.
You can use FileZilla to change permission for a folder/directory in azure.
Download your publish profile from portal and connect thru FTP(set the connection in filezilla) and set the permissions.

webmatrix/razor: how to keep website anonymous but have windows authentication for gallery maintenance pages?

I'm using webmatrix, razor, c#. I've created a web site for friends, it's on godaddy. I've created web pages to upload or delete images for the gallery, they work ok on webmatrix on my laptop, but get an "access denied" error with godaddy, understandably since I'm an anonymous user.
Godaddy says it is doing windows authentication and the godaddy gui shows me the folders and the user accounts and their permissions.
Can anyone tell me please how to keep the rest of the web site anonymous but to do this with the web pages which amend the gallery:
1. some kind of authentication to get into
2. they also authenticate to godaddy so they have permissions to create/delete files in the relevant folders
I can't see how the WebSecurity class can help. I've read that by default it creates its own database of user accounts, so this could achieve 1, but not 2. I've also read that it can be configured to use windows authentication instead of its own database, but that to do this anonymous access must be disabled.
I'd be grateful for any help, I certainly am stuck. For anyone kind enough to reply, please bear in mind I'm not a web developer, I'm a server admin!
I'm not sure if you're attempting to allow the end users to go to their galleries using GoDaddy AND thru the website. That sounds like a difficult security challenge.
One approach is to only allow the web application to have access to all the files and folders on the server. Then you can forget about Windows authentication. Have the users authenticate using the WebSecurity classes and pages.
_PageStart.cshtml is a file whose code runs everytime a page is opened by a user. In there you can put code which controls who has access including anonymous activity. For example, users are always allowed to go to the account pages in the account folder, because that's where they sign in. So they are still anonymous before signing in. The code is simple:
// You're always allowed to go to the login pages
if ( Request.RawUrl.StartsWith( "/Account") )
{
return;
}
If the code returns from here and doesn't take any other action, the page will open normally.

Resources