Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Ayman Mashal

@Ayman Mashal
About
Posts
25
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • redirect iis to an asp.net subfolder
    A Ayman Mashal

    thank u all i fixed the problem by making the virtual directory type as a direct link

    ASP.NET csharp question html asp-net dotnet

  • redirect iis to an asp.net subfolder
    A Ayman Mashal

    Hi, 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

    ASP.NET csharp question html asp-net dotnet

  • HttpWebRequest
    A Ayman Mashal

    Hi , 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);

    ASP.NET csharp help question sysadmin data-structures

  • pass a parameter to a com+ application
    A Ayman Mashal

    Hi , 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

    COM database com question

  • embedding file into an XML file
    A Ayman Mashal

    how can i do that ?

    XML / XSL xml question

  • embedding file into an XML file
    A Ayman Mashal

    Hi All, can i embed a file (xml or pdf) within an XML file ? thanks

    XML / XSL xml question

  • moving to .net framework 3
    A Ayman Mashal

    hi, i want to upgrade an exsiting ASP.NET application . from VS2003 to VS2005 and the .net framework to version 3 so what do u mean by You shouldn't have any problems, except perhaps if you upgrade an existing ASP.NET app thanks

    .NET (Core and Framework) csharp visual-studio dotnet question

  • moving to .net framework 3
    A Ayman Mashal

    Hi 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

    .NET (Core and Framework) csharp visual-studio dotnet question

  • loosing data between postbacks [modified]
    A Ayman Mashal

    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.

    ASP.NET question database sysadmin help

  • loosing data between postbacks [modified]
    A Ayman Mashal

    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 control private 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

    ASP.NET question database sysadmin help

  • validating a date
    A Ayman Mashal

    thank u all the try/catch block works fine

    ASP.NET tutorial question

  • validating a date
    A Ayman Mashal

    hi 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

    ASP.NET tutorial question

  • needs your help before i get a heart attack
    A Ayman Mashal

    i 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 / C++ / MFC help question csharp visual-studio debugging

  • c free() function
    A Ayman Mashal

    Hi after freeing a pointer using free() is it required to set it to NULL ? thanks

    C / C++ / MFC question

  • debug mode VS execution mode
    A Ayman Mashal

    you 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

    C / C++ / MFC visual-studio debugging performance help question

  • debug mode VS execution mode
    A Ayman Mashal

    Hi 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

    C / C++ / MFC visual-studio debugging performance help question

  • realloc function problem
    A Ayman Mashal

    the 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 !

    C / C++ / MFC help question

  • realloc function problem
    A Ayman Mashal

    the 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

    C / C++ / MFC help question

  • realloc function problem
    A Ayman Mashal

    no 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 ?

    C / C++ / MFC help question

  • realloc function problem
    A Ayman Mashal

    Hi 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

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups