How to update resource file in TFS in VS - visual-studio-2013

I write an application in VS2013. The source code of app is managed by TFS. My application contains a resource file, that contains some images. When I add a new image to resource file, everything working correct after updating resource file to server. But when I replace some existing image in resource file with another image with the same name, nothing is updated. On the server remain original old image.
Do you have some tips how to update resource file after changing only image content? Thx

I resolved my problem. I just marked changed images in Resources folder solution by "Check Out for Edit.." TFS option and then I updated it by "Check-in" TFS option. Now its all fine

Related

Visual studio Image folder in sub project

In one of my visual studio projects there are some sub directories each of them containing sub projects. In one such sub-project I have an Image folder containing an image. Now I am not being able to load that image doing something like this.
<img id="loading" src="~/Image/loader.gif" alt="loader">
When I hover on it in my dev tool it shows me the path like
http://localhost:62360/Image/loader
and the image is not found on that location. Any idea what can be done?
For everyone with problems like that
I highly recommend, if its a part of your project that shouldn't be replaced or be replaced, to use a resource file. Here is a small instrction how to do so.
You can now simply choose "~/resource/WhatIsThis.png" as URL (usually in the GUI the url can be choosen via dialog).
As said in documentation, it is important to know that the resource file will store the URL to your image, not the image itself. But that won't make a difference in this case.

Assets not found in Railo Express

I downloaded and extracted railo express 4.2.1 to the base of my C: drive on windows 7. I started the application without making any configuration changes as I don't know what I would need to change. I created a CustomerService folder inside the webapps/root directory which holds my FW/1 customer service application. The ColdFusion code runs perfect however when I try to link to any other kind of resource such as css, js or image files they are not found. If I place an image in the CustomerService/assets/images/icons folder and add a link to it using the image does not show up (broken link icon instead). If I right click and view image I get a page that says:
Problem accessing /customerservice/assets/images/icons/add.png. Reason:
Not Found
Powered by Jetty://
The url path for the image that is displayed in the address bar is:
http://localhost:8888/customerservice/assets/images/icons/add.png
which from my understanding is correct and I have verified that the add.png image is in the icons folder of the images folder for the assets folder which is in the CustomerService folder.
Does anyone have any suggestions? Do I need to configure something in the Railo server or web administrators or in Jetty some how? If so what and how do I do that?
Thanks,
Jason Presley
When you use the internal server on Railo, it is case sensitive. That may be the issue. I see that you have "CustomerService" in camel case

app_code folder

Normally I only copy the dll files in the bin folder to update the website, when changing the codebehind.
I have made a change to a code file located in the app_code folder.
I have published the site and updated the bin folder with a lot of app_webxxx.dll files.
Now I get a parser error: Could not load the assembly 'App_Web_syn42ext
Is it possible to only update the dll files or do I need to update all aspx files everytime I make a change to get the website running ?
You need to do it as well, you need to update web pages as well, because if you will see when you publish the webpages in aspx page, on header tag, the reference of cs file upgrades itself.
So whenever you will publish there will be some random giud generated and will appended to file name, basically it reference to the name space.
So you will need to update web pages as well.

Cannot delete particular file

I am developing gallery viewer app. App will fetch the image file from Isolated Storage and will show in an image control. Most of the things are already setup and working fine.
Now images are stored in folders which act as album and user can delete the whole album. I tested with many many folders with assorted images and delete works fine. But I see that when there is a particular image file of name "XXXX.jpg", it doesn't get deleted. Although all the images from folder are shown in image control. That file doesn't gets deleted, and an exception is thrown "ArgumentUnhandledException". I tried after renaming the file but earth didn't move.
Also, for testing purposes I am transferring folders(with images in it) using "Windows Phone Device Manager". I know it is not official to use it, but it makes testing easy. Also peculiar thing is that "Windows Phone Device Manager" also cannot delete that particular file, although I dumped that file in app's isolated storage using "Windows Phone Device Manager". So I think that there is some problem with that file.
How can I delete the file. And if I cannot, how can I know it before hand that some files cannot be dealt with properly and should not be dumped in Isolated storage.Here is that file. File is inside zip file. I think file is required and not not just uploading image to a image hosting site. Please take a look. Also try not to look over the content of image file, that's only random file which is not working and I want to know why.
I found that file was marked read-only and was causing problem when a delete attempt was made. Removing read-only solves the problem.

How to download images from the same folder as where the image is uploaded?

I am creating a project wherein the user can upload his photo. This photo is stored in the folder "images/uploads/filename". When his profile is created and the photo is to be shown, I use the <img> tag with src as "images/uploads/filename", but the photo does not show up.
If I manually copy the photo to an adjacent folder "images/abc/filename" and then use it as the source then it works.
How is this caused and how can I solve it? I need to use the same folder to upload and download photos.
That can happen if you're running the webapp as an IDE project and are storing the uploaded images in the IDE's project space. Changes in the IDE's project folder which are performed externally (as by your servlet code) does not immediately get reflected in the deployed server's work folder. Only when you touch it (by refreshing the project) or by copying it (as you happen to have found out), then it will get reflected.
After all, storing uploaded files in the webapp's deploy folder is a bad idea. Those files will get all lost whenever you redeploy the webapp, simply because those files are not contained in the original WAR file.
You need to store them somewhere outside the webapp's deploy folder on a different fixed path like /var/webapp/uploads. You should not use relative paths or getRealPath() to create the File object around it. Just use a fixed path. You can always make the fixed path configureable as a context param setting, a VM argument, a properties file setting or even a JNDI entry.
Then, to serve it to the world wide web, just add exactly that path as another docroot to the server config. It's unclear what server you're using, but in Tomcat it's a matter of adding another <Context> to the server.xml.
See also:
Uploaded image only available after refreshing the page
How I save and retrieve an image on my server in a java webapp
Make sure your have the correct path and include the image extension
just for testing, put your img tag inside the index.php
<img src="images/abc/filename.jpg">
/root/index.php
now put you image in to the your abc/ folder
/root/images/abc/filename.jpg
This should display the image.
if you have your img tag inside another folder in the root like below
/root/user/index.php
now when you use you img tag use this path (relative link):
<img src="../images/abc/filename.jpg">
note the beginning of the image path "../" this is used to go back to the root.
if the php or html file that is holding the img tag is even deeper, just remember to add ../ for every level, 2 folders deep whould be:
<img src="../../images/abc/filename.jpg">
Question was quite vague so hope this is what you are looking for.
let me know and if this is wrong, explain a little more and i will try to help :)

Resources