How to remove the Virtual Directory part in the links for my media files? - orchardcms

I have started a new orchard project and I uncheck Use IIS Express in my Orchard.web property's Web section and change the Project Url to http://localhost/TestOrchard, then I press Create Virtual Directory.
I uploaded some pictures in my Media folder and use it in my homepage.
Everything seems ok when I view it locally.
But when I deploy it to my website, the link pointing to the media file becomes
/TestOrchard/Media/Default/image/mypic.PNG
Since the TestOrchard folder does not exist in the remote server, media files cannot be read and also the media tab on my Admin control panel shows nothing.
The correct url should be /Media/Default/image/mypic.PNG
How do I remove the unwanted TestOrchard/ folder shell?

In the Admin/Settings, you can change your Base Url.

Related

Directory browsing disable in IIS however application log files were disclosed within the ‘log’ folder

I set the Directory Browsing to false in IIS. After that it is not possible to list files in directories on website. It works! However I can browse the file path through the http link. The following example screenshot below shows that sensitive information such as application log were disclosed within the ‘log’ folder through directory listing of the web server
How to disable file browsing also?
You can set permissions for these files so that users don’t have access. Click on your website in the sites and right-click find switch to the content view, you can see your website documents and then edit the permissions for the file. You can directly select the hidden option in the attributes. In this way, the visiting user will not be able to see it.

How do I change the login screen images with a customization project?

When I login in Acumatica, my users see the default Acumatica images and I would like my own branding instead.
How do I replace the login screen's images with my own ?
How can I do that so for hosted ans SaaS environments ?
To customize the login screen for your own hosted or SaaS environment, you will have to develop a customization project on your local environment. The following guide will tell you how to replace one of the login image and the logo shown on the login screen.
The first step is to modify your local environment files.list file.
It is located at the root of your site (e.g. YourAcumaticaSite\files.list).
For my example, I need to remove Icons\login_bg1.jpg and Icons\login_logo.png from files.list. Save the file.
Now go to your local site Icons folder (e.g. YourAcumaticaSite\Icons ) and replace the same two files (login_bg1.jpg and login_logo.png) with your own images.
It is important to keep the exact same file name.
For the next step, go on your local site customization project screen (SM204505) and edit/create the customization project that will contain these new images.
Go in the Files section, click on the Add button (+) and select the two new images.
Save the project, export it and publish it on your staging/production environment.
You can now admire your new login screen.
If the images shown are still the old ones, your browser might have cached the images. To clear your favorite browser cache, follow instructions found here : https://www.refreshyourcache.com/en/home/
Once you are done, you can go back to your local website to edit the files.list file and put back the lines we previously removed.

HTTP 403 Forbidden : This website requires you to log in

Using asp .net MVC 4.0 , razor , VS2010 , IIS5.2 , windows Server 2003
I have built an application which i want to publish in IIS. what i did is listed below:
Cleaned then built the solution.
right click on project file and clicked PUBLISH.
publish method : File System
Target Location : C:\Inetpub\wwwroot\testing
then publish.
Then i went to IIS and got my site in Default web sites. happy :). Then i did:
right clicked on testing(my app) and open properties.
In the tabdirectory everything goes fine.
in asp.nettab, i set asp .net version 4.0.30319
here is a little confusion, I set home/index as my default content page in documentstab
then I right click testing and clicked browse. And it shows :
Most likely causes:
This website requires you to log in.
This error(HTTP 403 Forbidden) means that this program was able to connect to
the website, but it does not have permission to view the webpage.
a short summury what i got as error message. This is my fist mvc application and first hosting. What is my fault here? what should i do now?
I had the similar issue. Please try the following:
A. Suggestion below from Microsoft Technet helped me:
The solution is to ensure that the Authenticated Users or \Users group (which usually contains DOMAIN\Users group) has Read & Execute, List Folder Contents and Read permissions on the /BIN folder below C:\inetpub\wwwroot\wss\VirtualDirectories{Sitename80}. Follow the steps listed below to grant the required permissions:
Open Windows Explorer and navigate to the /bin directory of
your web application
Right-click on the folder and click on Properties
Go to Security tab and click on Edit
Click on Add and add the local server group Authenticated
Users or < SERVER NAME >\Users (this usually contains
DOMAIN\Users group).
Select the Read & Execute, List Folder Contents and Read
permissions (if you are planning to add Everyone to the /bin folder,
grant Read permissions only)
Click OK to apply the new settings
NOTE: you may need to to it after every Publish, as permissions somehow may get reset.
B. In VS - set the default page for your website, or try navigating to specific page as opposed to simply opening the website with only the site name.
I know it sounds dumb, but that also was the problem for me
after publishing your webiste to IIS, navigate to http://myServer/mySite/somePage instead of http://myServer/MySite

Restricting access to files within a folder to webservice IIS6/7

I am looking for a way to restrict direct access to a certain folder or folders on our website which is hosted in IIS7 in our second dev environment, IIS6 in our first dev environment and IIS6 on production.
Basically we should be able to link to these files from our website i.e.:
http://www.domain.com/stuff/survey.pdf
But if someone tries to link to this from a blog post, etc. it should not serve the content. Is there any way to do this in a web config or is that beyond the abilities of IIS?
What I ended up doing was writing a PHP script which served content from outside of the web root, but only if the user was logged in and had a valid site cookie.
Then I created folders to replace all the content we were currently serving (.pdf, .png, etc.) since there was not that much that we wanted secured. I name the folder the same as the original document, i.e.: /webroot/survey.pdf/ and then placed the index.php inside of the survey.pdf folder.
This worked, and now we can use the script to link to content that we want secured.

Loading a web site to IIS

A developer just send me a running website files from IIS directory. I want to know if I can run the website on my PC. The file contain "Default.aspx" file, which I assume is of some importance.
I want to know if it is possible to run the website on my PC, I have installed IIS and I placed the file in the wwwroot folder, but unfortunately I dont know how to proceed from here.
Can someone please point me to the right way to continue with this task.
Thanks in advance
First time use of IIS
Now that IIS is running on your system, it should have defaulted to running on port 80. You can test this out by going to http://localhost/
The file you have placed in the wwwroot directory Default.aspx is an ASP.NET application. You need to go to IIS and convert the directory it is stored into a web application.
Now when creating web applications, it is better to create them in another folder other than your wwwroot folder, and in the case of this tutorial it is easier. Move your Default.aspx into a folder named 'webapp', or something of the like.
To convert it into an application, do the following:
In the Server Manager, expand the
'Roles' item in the tree
Expand the 'Web Server (IIS)' item
Click on 'Internet Information Services (IIS) Manager
In the window on the right hand side, you will need to open up your server. In my case, my server is called WIN2008R2. Your server name will be located inside the 'Connections' pane. Expand your server in the tree
Expand the 'Sites' item
Expand your newly created site. There should only be one there, and the item will have a globe next to it
Now right click on your 'webapp' item which will have a folder next to it, and click 'Convert to Application'. Then leave all the properties the same in the window that comes up and click OK.
You have now created a new web application. By going to http://localhost/webapp you should see it working.
You need to configure IIS to host an ASP.NET website.
You can find information about configuring IIS here: http://msdn.microsoft.com/en-us/library/ms178477.aspx
Another option is using the Cassini web server (instead of IIS). You may find it easier to configure: http://ultidev.com/products/cassini/

Resources