What is the Cassini BTW? The problem was with the winXP firewall. I made it off now i can access the p6count.aspx page. Thanks any way for your time.
aman2006
Posts
-
Cannot access aspx from development machine -
XML ContentHi, I am trying to grab XML contents using ASP.Net page . But i think i am not getting all the contents of XML but only half. I am using this code. Response.ContentType = "text/xml"; Response.BufferOutput = true; //Reads the request and load the string StreamReader reader = new StreamReader(Request.InputStream); StrDS = reader.ReadToEnd(); reader.Close(); Then i am putting into one XML file. But any body can guide whteher i am doing right or wrong here. According to specs of the server i should get the more contents. Then i need to send some response to server like tag. I am sending it but i don't want it to display on the Internet page. Becasue i am displaying some usefull data on it. Code i am using is. Response.ContentType = "text/xml"; Response.Write("<ErrorList><Success>WEBAPP.dll/XMLPost</Success></ErrorList>"); Response.End(); But this text is always displayed. Can anu body tell me how to send the response without displaying it on IE page Thanks Shailesh
-
Cannot access aspx from development machineHi I want to do some real time debugging on my development machine(WinXP). I wrote an simple ASP.Net application using Vs2005.net in which the default page is p6count.aspx. None of the machine in my office can access this page. Can any body tell me what settings i need to do to access this page from any other machine within my office ? I am able to ping my machine from all other machine in my offcie. Thanks Shailesh
-
Hex String into numberSnorkie Thanks for the solution but it is not giving me the correct number still. for Hex string 100000 value should be 16. 060100= 262 1C0000= 28 Any other suggestion please. I am running out of my module time. Please reply. Thanks Shailesh
-
Hex String into numberThanks Hogan but i think you did not read the question. It is writing the LS byte first when i use your solution it is giving me 1048576 not 16. Any body please help me Thanks in advance shailesh
-
Hex String into numberHello I have one question regading the conversion of Hex String into Decimal number. Hex Number is in format “aaaaaa” This 24-bit field is the direction “A” counter stored LS-byte first. Example is, take this hex string "100000" which is decimal equivalent is 16 But i don't know how to convert this number into decimal number. If i give this number to C# function it is not giving me the exact 16 equivalent. Another exanples are 060100= 262 1C0000= 28 Can any body please help me how to convert these numbers into decimal equivalent using C# Thanks Shailesh
-
Writing Http msgs to LOG fileno Edit control does not exist in the picture Any more suggestion shailesh
-
Writing Http msgs to LOG fileHi I know how to assign the window for the status of messages in Http request as: CHttpSession *pHttpSession; pWnd = GetDlgItem(IDC_EDIT_RESPONSE); pHttpSession->SetStatusWnd(pWnd); How can write these messages into a LOG file instead to a window? Any suggestion please. I have to insert all the messages from Http to the Log file. Thanks in advance Shailesh
-
CHttpFile->WriteStringWhile going into loop it throws the exception at strSend = strData.Mid(x,500) after going into loop 2 or 3 times . May be it is reached at the end of strData. Any Suggestion Thanks Shailesh
-
CHttpFile->WriteStringHi I have one CString strData with data and i want to send it on to the server in Chunk of 500 Bytes only.Please tell me how can i do that. Right now i am sending it as whole. here is the code strData = _T("Data=") + URLEncode2(strData); pHttpFile->AddRequestHeaders(strHeaders); pHttpFile->SendRequestEx(strData.GetLength()); pHttpFile->WriteString(strData); Thanks Shailesh
-
TabControl DialogHi Hi I have a tabcontrol on a view window. I want to show a particular tab Window which has an error because i am validating some data i am using the function void CNewForm::ShowErrorDialog(int TabNo) { TC_ITEM tci; tci.mask = TCIF_PARAM; tci.lParam = (LPARAM)m_pDlgHeader; m_MyTab.SetItem(0, &tci); CWnd* pWnd = (CWnd *)tci.lParam; pWnd->ShowWindow(SW_SHOW); } It is focussing on particular tab but not showing the window. m_pDlgHeader already created during onInitDialog() function. Please help me why it is not showing the particular tab dialog. Thanks in advance Shailesh
-
Menu on CFormView DerivedHi I have some 4 views all derived from CFormView. There is no system default menu in all. But i want to hang one menu in one of the view like Tools-->Copy. I tried some options but it is failed. Can anybody tell me how to create this menu using CMenu class or with some other method?? Thanks in advance Shailesh
-
Window Service Parameters from INI fileThanks David U are Rock. Thanks shailesh
-
Window Service Parameters from INI fileI am using #define BUFSIZE MAX_PATH
-
Window Service Parameters from INI fileif i use GetModuleFinename(NULL..) I Get the Memory could not be read error. My Code is as BOOL FillParams() { CFileFind fileFinder; CIniReader m_IniFile; TCHAR Buffer[BUFSIZE]; DWORD dwRet,nSize; CString error; dwRet = GetModuleFileName(NULL,Buffer,nSize); if( dwRet == 0 ) { error.Format("Failed GetCurrentDirectory %d",GetLastError()); WriteToLog((LPSTR)(LPCTSTR)error); return 0; } WriteToLog(Buffer); // Here i am changing the path.. } But It is failing at GetModuleFineName function or crashing. Any Suggestion.. Thanks Shailesh
-
Window Service Parameters from INI filehi I wrote a service in which i want to pass some parameters from INI file but when i give the path as .\\TibcoTCPServer.ini it does not work but if i hard code the path it works fine. Can any body help me how can i pass the ini file path so that service will pick the parameters. Thanks Shailesh
-
Registry CorruptionIf i don't have write permission on that machine how can i write my entries in the Registry. In my code i am passing the Write Registry Permission as a parameter. Actuall i have made a installable with installed shield which runs my program at last for creating some entries. But it is corrupting the registry.... What about code is that fine or seems some problem????? thnaks Shailesh
-
Registry CorruptionHi I am writing a program which Creates Three entries into the windows registry but on some systems instead of creating the registry it locks the registry HKEY_LOCAL_MACHINE\SOFTWARE part and shows error "Access is denied" and after that it does not allow to create a entry into the registry, it seems that registry got corrupted but windows still works fine. I don't know. Is it the problem of Rights to write into the registrry or something else.This program works fine on my machine but does not works on some machines. Please help... BOOL CGenUniqueKeyXDlg::SaveValueToRegistry(char *pcszValue) { DWORD dwLen = 0; int nReturnVal; HKEY m_hContextKey; DWORD dwDisp; nReturnVal = RegCreateKeyEx(HKEY_LOCAL_MACHINE , //Handle to a currently open key REG_LOC_PATH, // Sub Key Name 0, //Reserved NULL, 0, KEY_WRITE, NULL, &m_hContextKey, &dwDisp ); if(nReturnVal != ERROR_SUCCESS) { ShowRegError(nReturnVal); return FALSE; } nReturnVal = RegSetValueEx(m_hContextKey, UNIQUE_KEY, 0, REG_SZ, (PBYTE)pcszValue, (_tcslen(pcszValue) + 1) * sizeof(char)); if(nReturnVal != ERROR_SUCCESS) { ShowRegError(nReturnVal); return FALSE; } strcpy(pcszValue,m_SyncURL);//"http://Nopd/CiteCapture/MDCSync.aspx"; nReturnVal = RegSetValueEx(m_hContextKey, URL_KEY, 0, REG_SZ, (PBYTE)pcszValue, (_tcslen(pcszValue) + 1) * sizeof(char)); strcpy(pcszValue,m_Port); nReturnVal = RegSetValueEx(m_hContextKey, COM_PORT, 0, REG_SZ, (PBYTE)pcszValue, (_tcslen(pcszValue) + 1) * sizeof(char)); RegCloseKey( m_hContextKey ); return TRUE; } Any input will be appreciated Thanks Shailesh
-
Window Service QuestionHello Mil Service is started now on win2003, Now i am using the createthread and waitforsingleobject. There is no memory error but now i got one more problem it is giving me the clinet Socket error from the function below. I don't know what is the problem now i did not change any part of code for client request. can u suggest me something. UINT ClientThread(LPVOID pParam) { char buff[MAX_BUFFER_LENGTH]; CString cmd; CString params; int n; BOOL auth=false; SOCKET client=(SOCKET)pParam; // send(client,buff,strlen(buff),0); int nCounter = 0; CString strData; CString strFileName; SYSTEMTIME sysTime; while(true) { n=recv(client,buff,MAX_BUFFER_LENGTH,0); if(n==SOCKET_ERROR ) { WriteToLog("Client Socket Error"); break; } if(n == 0) { //continue; //if no data recieve exit the loop and close the connection and Client Thread break; } buff[n]=0; params = (char*)buff; if(nCounter == 0) { nCounter += n; WriteToLog((LPSTR)(LPCTSTR)params); GetLocalTime(&sysTime); strFileName.Format("%s\\User%d%d%d%d%d%d%d.xml",DataFolder,sysTime.wMonth,sysTime.wDay ,sysTime.wYear ,sysTime.wHour ,sysTime.wMinute ,sysTime.wSecond ,sysTime.wMilliseconds ); if(!xmlFile.Open(strFileName,CFile::modeWrite | CFile::modeCreate,NULL)) { errorMsg.Format("Unable to create %s file",strFileName); WriteToLog((LPSTR)(LPCTSTR)errorMsg); } int nRetVal = params.Find(";",0); if(nRetVal != -1) { cmd = params.Left(nRetVal); if(n > nRetVal) { strData = params.Mid(nRetVal + 1); { LPSTR lpstr = (LPSTR)(LPCTSTR)(strData); xmlFile.Write((PVOID)lpstr,strlen(lpstr)); } } }//end nRetVal else { // USES_CONVERSION; LPSTR lpstr = (LPSTR)(LPCTSTR)(params); xmlFile.Write((PVOID)lpstr,strlen(lpstr)); } if(params.Find(ENDXMLTAG) != -1) { xmlFile.Close (); nCounter = 0; ExecuteDosent(cmd,strFileName); cmd.MakeUpper(); if(cmd.Compare("DRUSER")) ExecuteInvokeBat(strFileName); //break; } }//End nCounter else { nCounter += n; LPSTR lpstr = (LPSTR)(LPCTSTR)(params); xmlFile.Write((PVOID)lpstr,strlen(lpstr)); if(params.Find(ENDXMLTAG) != -1) { xmlFile.Close (); nCounter = 0; WriteToLog((LPSTR)(LPCTSTR)params); ExecuteDosent(cmd,strFileName); cmd.MakeUpper(); if(cmd.Com
-
Window Service Questionhi I wrote a window service in which i am using the SOCKET API who listens to the clinet. This service runs fine on win2000 but if i run this on win2003 Server, it stop with some access violation error c0000005. I don't know whats is the problem. If i run my code without service means i make the console application and run this it does not show any error on win2003. I have this code like: int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { int nRetCode = 0; if(FillParams()) _chdir(DIR_PATH); else return 0; SERVICE_TABLE_ENTRY ServiceTable[2]; ServiceTable[0].lpServiceName = "TibcoTCPServer"; ServiceTable[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)ServiceMain; ServiceTable[1].lpServiceName = NULL; ServiceTable[1].lpServiceProc = NULL; // Start the control dispatcher thread for our service StartServiceCtrlDispatcher(ServiceTable); return nRetCode; } void ServiceMain(int argc, char** argv) { int error; ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; // SERVICE_WIN32_SHARE_PROCESS;// SERVICE_WIN32; ServiceStatus.dwCurrentState = SERVICE_START_PENDING; ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; ServiceStatus.dwWin32ExitCode = 0; ServiceStatus.dwServiceSpecificExitCode = 0; ServiceStatus.dwCheckPoint = 0; ServiceStatus.dwWaitHint = 0; hStatus = RegisterServiceCtrlHandler( "TibcoTCPServer", (LPHANDLER_FUNCTION)ControlHandler); if (hStatus == (SERVICE_STATUS_HANDLE)0) { // Registering Control Handler failed WriteToLog("Registring Control Handler failed"); return; } // Initialize Service error = InitService(); if (error) { // Initialization failed ServiceStatus.dwCurrentState = SERVICE_STOPPED; ServiceStatus.dwWin32ExitCode = -1; SetServiceStatus(hStatus, &ServiceStatus); return; } // WriteToLog("Service Started _2."); // We report the running status to SCM. ServiceStatus.dwCurrentState = SERVICE_RUNNING; SetServiceStatus (hStatus, &ServiceStatus); AfxBeginThread(MTServerThread,0); return; } UINT MTServerThread(LPVOID pParam) { WSADATA wsaData; sockaddr_in local; int wsaret=WSAStartup(0x101,&wsaData); if(wsaret!=0) { return 0; } local.sin_family=AF_INET; local.sin_addr.s_addr=INADDR_ANY; int nPort = atoi(PORT); local.sin_port=htons((u_short)nPort); server=s