thank u all i fixed the problem by making the virtual directory type as a direct link
Ayman Mashal
Posts
-
redirect iis to an asp.net subfolder -
redirect iis to an asp.net subfolderHi, i have an asp.net project that contains a subfolder (myproj/subfolder) with some classes and pages i want to run what is in the subfolder in this fashion http://localhost/subfolder/.... etc can i do that ? i tried to create a virtual directory in IIS that points to myproj/subfolder but when i run the link http://localhost/subfolder/Client/UserPermissions.aspx i got the error
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.Parser Error Message: Could not load type 'subfolder.Client.UserPermissions'.
Source Error:
Line 1: <%@ Page language="c#" Codebehind="UserPermissions.aspx.cs" AutoEventWireup="false" Inherits="subfolder.Client.UserPermissions" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3: <HTML>Source File: C:\Inetpub\wwwroot\myproj\subfolder\Client\UserPermissions.aspx Line: 1
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
-
HttpWebRequestHi , i am trying to retreive an xml doc from another server on the same domain where my computer resides i am using HttpWebRequest from c# code but i am getting the below error how can i solve this problem without hardcoding a user name and password in the code ? thanks
The remote server returned an error: (401) Unauthorized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
Source Error:
Line 41:
Line 42: //From here on, it's all the same as above.
Line 43: HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
Line 44: //Let's show some information about the response
Line 45: Console.WriteLine(WebResp.StatusCode); -
pass a parameter to a com+ applicationHi , i have a vb com component dll , can i pass a parameter to this dll from the windows component services ? i need that coz the dll connect to a database so i want to send the database from outside and not be hard coded. thanks
-
embedding file into an XML filehow can i do that ?
-
embedding file into an XML fileHi All, can i embed a file (xml or pdf) within an XML file ? thanks
-
moving to .net framework 3 -
moving to .net framework 3Hi all, currently i am working on visual sutdio 2003 with .net framework 1.1,2 now i am thinking to move to .net framework 3 and visual studio 2005 does this affect my application should i do any special changes except of the installation ? does upgrading my solution on VS 2003 to VS 2005 affect any thing other than the solution itself ? kindly tell me about any effects that could happen due to this movement . thanks
-
loosing data between postbacks [modified]the problem is not appearing while i run the application in the local network ! i face the problem when i run the form throug VPN or remote connection which is slower . i am not loosing the data after a long time i am loosing it immediately after a postback which takes less than 2 seconeds and this happening sometimes from the first postback sometimes after 10 postbacks. for now what i did is checking if the Dataset in the cache is still exists or not if not i am generating it again which means loosing the not saved changes . but i want if there is an IIS configurations that could affect the cache ? many thanks.
-
loosing data between postbacks [modified]Hi in page_load im calling a function that retrieve data from the database
private void getLocationStdHours() { string cacheKey = "stdHoursDS"; //the key to get/set our cache'd data LocationsBL Loc = new LocationsBL(); DataSet ds=Loc.GetLocationStdHours(vLocCode); Cache.Insert(cacheKey,ds,null,DateTime.Now.AddHours(1), TimeSpan.Zero); dgLocStdHours.CurrentPageIndex=0; dgLocStdHours.DataSource=((DataSet)Cache["stdHoursDS"]).Tables[0]; dgLocStdHours.DataKeyField="rownum"; Response.Write("before : "+((DataSet)Cache["stdHoursDS"]).Tables[0].Rows.Count); dgLocStdHours.DataBind(); btnNew.Disabled = false; }
the data shows fine without problems but when i click the "New Record" button which is a server controlprivate void btnNew_ServerClick(object sender, System.EventArgs e) { DataSet ds = Cache["stdHoursDS"] as DataSet; if(ds == null) { Response.Write("Session timeout - please reload page"); return; } .....
the Cache["stdHoursDS"] is null now !!! but not always in some cases it works sometimes not ? what is the problem here ? Note : this problem just appear when i connect from outside the local lan using VPN or the intranet . its work prfectly from my PC or other PCs in the same lan thanks -- modified at 4:43 Thursday 3rd May, 2007 -
validating a datethank u all the try/catch block works fine
-
validating a datehi i am trying to validate a string that contains a date using DateTime.parse function but this function accepts for example the date "31-feb-2007" !! how can i validate the date to be valid not just the format . thanks
-
needs your help before i get a heart attacki am writing a c project using visual studio 6 the programme runs perfectly in debug mode and gives the right output but when i am trying to execute the program (ctrl+f5) its failed and raise an application error the instruction at 0x7c9..etc referenced memory at 0x00344..etc the memory could not be "read" . i know that maybe i have an error in my dynamic memory allocation but how can i find it while its run fine in debug mode . should i put a print messages in the code !!!!??? :((((( thanks .
-
c free() functionHi after freeing a pointer using free() is it required to set it to NULL ? thanks
-
debug mode VS execution modeyou are right at some point realloc returns NULL !!!! why ? the calculation of the memory size is fine i put some print messages in the code and here is the output : DC: 0 before realloc : 0 after realloc : 323b78 DC: 1 before realloc : 323b78 after realloc : 323b78 DC: 2 before realloc : 323b78 after realloc : 323b78 DC: 3 before realloc : 323b78 after realloc : 323b20 DC: 4 before realloc : 323b20 after realloc : 323b20 DC: 5 before realloc : 323b20 after realloc : 323b20 DC: 6 before realloc : 323b20 after realloc : 323b20 DC: 7 before realloc : 323b20 after realloc : 323b20 DC: 8 before realloc : 323b20 after realloc : 323b20 DC: 9 before realloc : 323b20 after realloc : 323b20 DC: 10 before realloc : 323b20 after realloc : 323b20 DC: 11 before realloc : 323b20 after realloc : 323b20 DC: 12 before realloc : 323b20 after realloc : 323b20 DC: 13 before realloc : 323b20 after realloc : 323b20 DC: 14 before realloc : 323b20 after realloc : 323b20 DC: 15 before realloc : 323b20 after realloc : 323bc0 DC: 16 before realloc : 323bc0 after realloc : 323bc0 DC: 17 before realloc : 323bc0 after realloc : 323bc0 DC: 18 before realloc : 323bc0 after realloc : 323bc0 DC: 19 before realloc : 323bc0
**after realloc : 0**
note that if i decrease my string length its work fine !! is there any place in the project setting the sets the allowed space for the programme ? thanks -
debug mode VS execution modeHi i want to know in terms of memory allocation what is the diffrence between the debug and execution mode i have a code that work fine in debug mode and finish successfuly while its faild in execution mode with the error : The instruction at "0x...etc" referenced memory at "0x000000002c" .The memory could not be "written" my code is :
for(i=0;i and the declaration of dSegment is `struct { unsigned int DC; int *segment; }dSegment;` thank in advance
-
realloc function problemthe array is created by adding characters using the following function
void Append(char **buffer,int size,char c) { (*buffer)=(char *)realloc(*buffer,(size+1) * sizeof(char)); (*buffer)[size-1]=c; (*buffer)[size]='\0'; }
after the array is created i am running the function that raise the error several times and its work fine and i increase and decrease its content using the following function :void replaceStr(char **replaceIn,char *replaceWith,int fromIndx,int toIndx) { char *ptr=(*replaceIn)+fromIndx; int replaceWithLen=(replaceWith==NULL)?0:strlen(replaceWith); int replacedStrLen=toIndx-fromIndx; int originalStrLen=strlen(*replaceIn); //int str3Len=strlen(str3); int shift=replaceWithLen-replacedStrLen; int bytesToMove=strlen(ptr)+1; int originalLength; printf("%s\n",*replaceIn); if(replaceWithLen==0) { memmove(ptr-1,ptr+replacedStrLen,bytesToMove); } else { if(replaceWithLen>replacedStrLen) { originalLength=strlen(*replaceIn); (*replaceIn)=(char *)realloc(*replaceIn,(originalLength+shift+1) * sizeof(char)); if(*replaceIn==NULL) printf("Error while allocating memory"); *((*replaceIn)+originalStrLen)='\0'; ptr=(*replaceIn)+fromIndx; memmove(ptr+replaceWithLen,ptr+replacedStrLen,bytesToMove); } else memmove(ptr+replaceWithLen,ptr+replacedStrLen,bytesToMove); } memcpy(ptr,replaceWith,replaceWithLen); }
the error happen at some point in the line in bold ! -
realloc function problemthe array is created by adding characters using the following function
void Append(char **buffer,int size,char c) { (*buffer)=(char *)realloc(*buffer,(size+1) * sizeof(char)); (*buffer)[size-1]=c; (*buffer)[size]='\0'; }
after the array is created i am running the function that raise the error several times and its work fine and i increase and decrease its content using the following function :void replaceStr(char **replaceIn,char *replaceWith,int fromIndx,int toIndx) { char *ptr=(*replaceIn)+fromIndx; int replaceWithLen=(replaceWith==NULL)?0:strlen(replaceWith); int replacedStrLen=toIndx-fromIndx; int originalStrLen=strlen(*replaceIn); //int str3Len=strlen(str3); int shift=replaceWithLen-replacedStrLen; int bytesToMove=strlen(ptr)+1; int originalLength; printf("%s\n",*replaceIn); if(replaceWithLen==0) { memmove(ptr-1,ptr+replacedStrLen,bytesToMove); } else { if(replaceWithLen>replacedStrLen) { originalLength=strlen(*replaceIn); **(*replaceIn)=(char *)realloc(*replaceIn,(originalLength+shift+1) * sizeof(char));** if(*replaceIn==NULL) printf("Error while allocating memory"); *((*replaceIn)+originalStrLen)='\0'; ptr=(*replaceIn)+fromIndx; memmove(ptr+replaceWithLen,ptr+replacedStrLen,bytesToMove); } else memmove(ptr+replaceWithLen,ptr+replacedStrLen,bytesToMove); } memcpy(ptr,replaceWith,replaceWithLen); }
the error happen at some point in the line in bold ! -- modified at 4:21 Sunday 4th March, 2007 -
realloc function problemno its not null because when i debug the code *ptr contains a string . and kindly note the the realloc code that i added is used in many calls before for the same array and its work fine when the array size is in smaller size but if i added some characters to it then the allocation failed and i get the error (if i added one character !!) i think this happen when realloc moves the array to another place and returns a new pointer ?
-
realloc function problemHi i have a function that gets a parameter of type (char **ptr) i want to reallocate the space for this pointer (reduce or increase) i have the followig code that raise an error when realloc change the original pointer
**(*ptr)=(char *)realloc(*ptr,(originalLength+shift) * sizeof(char));**
what is the problem in this line note : its work fine when realloc returns the same pointer ? thanks