Click here to Skip to main content
15,889,855 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionEmbedding Javascript in ASP Pin
jase7629-Apr-07 19:13
jase7629-Apr-07 19:13 
AnswerRe: Embedding Javascript in ASP Pin
Lijo Rajan29-Apr-07 22:57
Lijo Rajan29-Apr-07 22:57 
QuestionHow to refresh the Datagrid page? Pin
dfwzh29-Apr-07 18:38
dfwzh29-Apr-07 18:38 
AnswerRe: How to refresh the Datagrid page? Pin
Christian Graus29-Apr-07 18:47
protectorChristian Graus29-Apr-07 18:47 
GeneralRe: How to refresh the Datagrid page? Pin
dfwzh29-Apr-07 19:26
dfwzh29-Apr-07 19:26 
GeneralRe: How to refresh the Datagrid page? Pin
Chetan Ranpariya29-Apr-07 20:21
Chetan Ranpariya29-Apr-07 20:21 
AnswerRe: How to refresh the Datagrid page? Pin
Tridip Bhattacharjee29-Apr-07 20:54
professionalTridip Bhattacharjee29-Apr-07 20:54 
QuestionWeb Application works perfectly on local server but not on web server Pin
lesleyag29-Apr-07 15:37
lesleyag29-Apr-07 15:37 
Confused | :confused: We are looking for some assistance to get all aspects of our web application working on the web server.

Just to give a brief overview, we have created an application which allows people to sign up to use our general classifieds section. Upon clicking the submit button, the application inserts the record into the appropriate table in our MSSQL database, creates a new sub-folder for the user, using their username, and the creates two more sub-folders (one to store images and one to store PDF files) under the Username's folder.

The registered user can search the classified listings and the results pane shows a small thumbnail and decription. The user can click on the thumbnail to view more details. The problem we are experiencing is the display of the thumbnail and image.

Prior to this we had problems in uploading the image to the server in the following function:

private void SaveImages()
{
if (Session["UserType"].Equals("Customer"))
{
if (FileUpload1.FileName != "")
/* {
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\Customer\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName);
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\" + "AllClassifiedsImgs\\") + FileUpload1.FileName);
} */
{
File.Copy(FileUpload1.PostedFile.FileName, Server.MapPath("~\\Customer\\" + Session["username"].ToString() + "\\Classified_Images\\") + FileUpload1.FileName, true);
}
if (FileUpload2.FileName != "")
{
File.Copy(FileUpload2.PostedFile.FileName, Server.MapPath("~\\Customer\\" + Session["username"].ToString() + "\\PDF_Files\\") + FileUpload2.FileName, true);
}
}
else if (Session["UserType"].Equals("Shopper"))
{
if (FileUpload1.FileName != "")
/* {
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName);
ResizeImage(300, 300, FileUpload1.PostedFile.FileName, Server.MapPath("~\\" + "AllClassifiedsImgs\\") + FileUpload1.FileName);
} */
{
File.Copy(FileUpload1.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\Classifieds_Images\\") + FileUpload1.FileName, true);
}

if (FileUpload2.FileName != "")
{
File.Copy(FileUpload2.PostedFile.FileName, Server.MapPath("~\\PWC_Shoppers\\" + Session["username"].ToString() + "\\PDF_Files\\") + FileUpload2.FileName, true);
}

}

}

We commented out the portion of code which called the Resize function and just opted to use the File.Copy line (hopefully you can follow this above) and got around the image uploading issue.

The problem we have now is that when the results are displayed, the thumbnails and images are displayed as small red x's indicative that the filepath/filename is either invalid or the image is not present.

When the developer tests this same application on his computer, the application works as it should. When I copied the exact same folders/files to my own local computer to see if the fact we have our web applications located on the F drive (not the C drive) was the reason however I get the same problems with the display of the images.

I suspect it is a configuration issue or a setting held in the ASPX/ASPX.CS files where it is looking for files or directories or paths which are present on the development environment but not on the server but this is only a guess.

I am late in getting this application released for general use and as a result losing a lot of credibility rapidly. If anyone can help us to solve this issue, I would be eternally grateful.

Please ask any questions you wish as I may not have explained the problem clearly enough.

Kind regards
Lesley

Lesley
Popweb City

AnswerRe: Web Application works perfectly on local server but not on web server Pin
Christian Graus29-Apr-07 17:35
protectorChristian Graus29-Apr-07 17:35 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
lesleyag29-Apr-07 17:41
lesleyag29-Apr-07 17:41 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
Christian Graus29-Apr-07 18:17
protectorChristian Graus29-Apr-07 18:17 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
lesleyag29-Apr-07 18:37
lesleyag29-Apr-07 18:37 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
Christian Graus29-Apr-07 18:49
protectorChristian Graus29-Apr-07 18:49 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
lesleyag29-Apr-07 19:54
lesleyag29-Apr-07 19:54 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
Christian Graus29-Apr-07 22:19
protectorChristian Graus29-Apr-07 22:19 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
lesleyag29-Apr-07 21:50
lesleyag29-Apr-07 21:50 
GeneralRe: Web Application works perfectly on local server but not on web server Pin
Christian Graus29-Apr-07 22:21
protectorChristian Graus29-Apr-07 22:21 
QuestionHow to set a Frist Row in GridView Pin
srieen29-Apr-07 11:31
srieen29-Apr-07 11:31 
AnswerRe: How to set a Frist Row in GridView Pin
Christian Graus29-Apr-07 12:22
protectorChristian Graus29-Apr-07 12:22 
GeneralRe: How to set a Frist Row in GridView Pin
srieen29-Apr-07 16:42
srieen29-Apr-07 16:42 
GeneralRe: How to set a Frist Row in GridView Pin
Christian Graus29-Apr-07 17:31
protectorChristian Graus29-Apr-07 17:31 
AnswerRe: How to set a Frist Row in GridView Pin
Arun.Immanuel29-Apr-07 17:48
Arun.Immanuel29-Apr-07 17:48 
QuestionAdding JavaScript to an ASP Image Pin
Kris10029-Apr-07 10:55
Kris10029-Apr-07 10:55 
AnswerRe: Adding JavaScript to an ASP Image Pin
Kris10029-Apr-07 10:59
Kris10029-Apr-07 10:59 
GeneralRe: Adding JavaScript to an ASP Image Pin
Christian Graus29-Apr-07 12:50
protectorChristian Graus29-Apr-07 12:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.