Hopefully I can explain completely providing real info
To start with then we have a LinkButton whose text is actually an image tag.
The image it links to is a Png and resides in a folder in the web directory. This is IIS V6 and win Server 2003.
The path is http://webaddress/Admin/Images/image.png
Admin is a virtual directory configured in IIS.
The above url doesn't work but if you change it to http://webaddress/admin/Images/image.png (lowers case 'a') then the image is served, change it back to 'A' and it takes you to login, you log in and it loops back to log in. change to 'a' and voila the image is served. Weirdly this problem doesn't always occur and I have hunted for a resolution for days to no avail. Any ideas?
Thanks
As requested this is the complete link button
<asp:LinkButton ID="lnkCommitAll" runat="server" CausesValidation="false"><asp:Image ID="imgCommitAll" runat="server" ImageUrl="~/Images/Grid/confirm_16.png" AlternateText="Commit All Changes" /> Commit All</asp:LinkButton>
Could you post the whole LinkButton tag?
If Admin is a virtual directory then your image url should be like ~/Images/image.png
If so, do you have your virtual directory placed under the root with also a map called admin? In this case, try to rename it to "Admin", but don't forget to change the path in IIS for your virtual Directory.
I've had a similar problem before.
Hope this helps,
Arne
Related
I am in a really interesting situation right now.
After migrating a client website from a development environment using, WP Clone by WP Academy, I get this error when trying to upload images via the Worpress media uploader.
“image.png” has failed to upload due to an error
Unable to create directory uploads/2015/07. Is its parent directory writable by the server?
I logged into Godaddy and change the entire uploads/ folder permission via ssh to 777 (crazy enough). And all its contents.
I still got the same error.
After probing a little deeper, I found out the website is running from a different location than the machine i am sshed into.
What do I mean?
When I run pwd via ssh, to see my current working directory I get.
-bash-4.2$ pwd
/home/clientname/html/wp-content/uploads
But In the Wordpress setting at, Settings -> Media
The option "store uploads in this folder" has a value of
/home4/d***71/public_html/website.url/wp-content/uploads
Meaning The site files are copied and hosted in a different location than that given via the SSH, This is probably due to the fact that Godaddy's managed wordpress hosting has some special cache setting configured beyond the control of the user.
The problem now is how do I correct the File Permission issue and have my uploads working properly.
:)
I am just adding this, if anyone ran into the same issue in future.
Log into your GoDaddy account.
Go to the Hosting page.
Click Manage
Select File Manager for the domain you want to edit the permission (this is, if you have multiple domains)
Navigate to the folder where you have installed the WordPress.
Hover on the 'wp-content' and you should able to see an arrow, click to see the option called 'Change Permissions'.
You should able to see all the Permission details in this window.
login into your godaddy panel and click file manager
click or open your project folder
locate upload folder and click on check box
click into the privacy icon and check inherit an SET ALL SUB FOLDERS TO INHERIT PERMISSIONS both checkboxes
The "Hover" didn't work for me. What DID work was to go to the directory above, put ONE check in a box for a DIRECTORY (not a file), and then click on "Privacy".
GoDaddy Permissions
If you check more than one folder, OR a file, you won't get the permissions eyeball to light up.
So, to fix a file permission you would have to go to the level above, and change "Set all subfolders to inherit permissions".
Apparently you can't change some files and not others - just the parent folder, which then sets all the files (is my guess).
This is NOT a limitation of Windows, it's the broken way they establish permissions.
Anyway - hopefully that will work. Tech support confirmed the drop down doesn't work anymore.
== John ==
currently I have setup my page in IIS. It can be accessed over the IP address of the server only (so something like: "127.0.0.1"). What I want to do is move the page to a sub-directory, so that if someone uses the IP addess only, he won't get to the page (404 error). I would like the page to be accessible by using something like this: "127.0.0.1/someName". This should let the user access the default page, as it is now. Is this possible?
Thanks!
You are looking for Virtual Directories.
Right click the site, and click Add Virtual Directory. Give it a name (this will be the sub directory name).
Then, just make sure your virtual directory has the correct default page configured. For example, if MyPage.aspx should be the default, then put it in as the default document.
Noobie question...
Using IIS7, I am trying to create a virtual directory for the folder that contains my video files, but can't get my head around how it is done.
For example...
The existing address is http://www.mydomain.com/members
which points to C:\wwwroot\mydomain\members
I need http://www.mydomain.com/flash-members to point to the same path.
The existing IIS path to the members folder is Server\Sites\www_mydomain_com\members (has application icon)
Any help is appreciated.
For your example, assuming www_mydomain_com is the Site (little world icon), you can do this by:
Open IIS Manager
Right-click the web site, select Add Virtual Directory
In the Alias field, enter flash-members
In the Physical Path field, enter your path (C:\wwwroot\mydomain\members)
I have a WebForm that contains the following definition for the FCKeditor:
<FCKeditorV2:FCKeditor ID="txtBody" runat="server"
BasePath="/fckeditor/"
Height="480px"
ToolbarSet="WebCal1"
>
</FCKeditorV2:FCKeditor>
This works fine in my VS2008-based web application. However, when I deploy it to a Virtual Directory in IIS, it looks for the FCKEditor files (e.g. javascript, stylesheets, etc...) in the /fckeditor folder, not in the /MyVirtualDir/fkceditor.
I've tried changing the BasePath to ~/fckeditor/, but then it won't work on my dev machine.
What is the right way to go, so that the FCKEditor maps onto the right directory. In my project the fckeditor directory is right off the root.
I user "~/fckeditor/" without a problem on both virtual directories, root directories and local machine.
Do you think something else could be going on? What does Firebug say is happening?
I figured it out. The piece that was confusing the FCKEditor was the SkinPath. When I'd set the BasePath to "~/fckeditor/", it would path this string + the path of the skin to JavaScript (e.g. ~fckeditor/editor/skins/office2003). And javascript could not resolve the relative path.
So the solution is to place this code in the form Page_Load event:
txtSignature.SkinPath = Path.Combine(this.ResolveUrl(txtSignature.BasePath), "editor/skins/office2003/");
I created a C# web project with MSVS 9 and thats all i know about my configurations.
In my browser i can access any aspx files i have in my project. However when i use http://localhost:3288/img/test.png i see nothing. The working directory is ./root, the png file is in ./root/img/test.png How do i have ASP.NET display my images and everything else in the folder? (and subfolders).
Is the .png included in the solution?
When you hit the "play" button your essentially starting up a new website ( localhost:2383 ) so if its not in the solution it won't be copied over to the new, temporary, website that the debugger attaches too.
If this is the problem a quick fix is to hit the "Show all Files" button on the top of your solution explorer, this will show all the files in that folder on your hard drive. Then right click on the .png you want to include and hit "Include in Project".
Based on your comment your only solution is to actually create an IIS site for your solution with the root dir the same as your web project. Then in the project properties you'll have to tell the debugger to attach to your local IIS instead of visual studios. Not sure the exact click path, right click on your project and go to properties, look for debugging options.
Give a look to the ASP Image control , you can specify paths starting in your app root (~):
<asp:Image id="Image1" runat="server"
ImageUrl="~/Images/image1.png"/>
Or you can use relative paths to the page that are displayed.
Check this article about ASP .NET Website Paths.