.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

.NET problem - no text appears when not running under hosting process

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :.NET Framework

I have the most annoying problem with .NET Framework 4 (both full and Client Profile).

Basically, when I debug my application under the hosting process (vshost), the problem doesn't occur. I've found it only when I ran the .exe directly from it's location, and now I see that it happens when I debug it as well, but not under hosting process.

The problem is that I cannot see any text inside the labels, inside message-boxs (even the Yes-No text from the buttons has dissapered), from buttons or text-boxs, it simply dissapears.

I tried creating a new .NET Framework 4 project, and the problem didn't appear. So I decided to re-create my application from scratch (almost from scratch). I've created a new solution file, new project files and included the .cs and .resx files from my previous solution. The problem persisted.

Interesting thing is though, that on my first solution I've changed the configuration platform to 'Any CPU' from 'x86', and the problem then appeared in either cases (even while running under the hosting process).

I wrote the app in VS2010. I am running on Windows 7 Professional 64-bit, SP1.


Please help!

View Complete Post

More Related Resource Links

text posing problem in different resolution


Hiiiii coders ,

iam using 14px for my font size in my project . It works fine when i run it on my system. But when i tried to run it on higher resolution the all the text gets shrinked . what is the best way to set font size for my text for all resolutions?

kindly provide me some code snippets.

thanx and regards 

Crystal Reports can grow fields with large amounts of text layout problem


A can grow field in the details section of a crystal report may have so much text that the section will be larger than the remaining space available on the page (the space below the previous record).  The section has vertical lines on it with Extend to bottom of section when printing set to true.  The section starts on a new page (and may continue on the following one).  I want it to start on the page where the last record was laid out, and continue to the new page without leaving a gap with vertical lines on it.  I'm using Crystal Reports 9 and I can't work out how to do it. Has anyone got a solution?

SharePoint Calendar Error: The "ListViewWebPart" Web Part appears to be causing a problem. Index was

In one specific SharePoint calendar, on one specific week in that calendar when we select the "more items" link in the monthly view (or the expand all option) we get the following error:
The "ListViewWebPart" Web Part appears to be causing a problem. Index was outside the bounds of the array.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Windows SharePoint Services.

If we select a different week the expand and collapse works fine in that calendar.

Problem while creating process memory dumps.

Hi, I have following piece of code: Imports System Imports System.IO Imports System.Runtime.InteropServices Imports Microsoft.Win32.SafeHandles Imports System.ComponentModel Module Module1 <Flags()> Friend Enum NativeMiniDumpType MiniDumpNormal = &H0 MiniDumpWithDataSegs = &H1 MiniDumpWithFullMemory = &H2 MiniDumpWithHandleData = &H4 MiniDumpFilterMemory = &H8 MiniDumpScanMemory = &H10 MiniDumpWithUnloadedModules = &H20 MiniDumpWithIndirectlyReferencedMemory = &H4 MiniDumpFilterModulePaths = &H80 MiniDumpWithProcessThreadData = &H100 MiniDumpWithPrivateReadWriteMemory = &H200 MiniDumpWithoutOptionalData = &H400 MiniDumpWithFullMemoryInfo = &H800 MiniDumpWithThreadInfo = &H1000 MiniDumpWithCodeSegs = &H2000 MiniDumpWithoutAuxiliaryState = &H4000 MiniDumpWithFullAuxiliaryState = &H8000 End Enum <DllImport("dbghelp.dll", CharSet:=CharSet.Auto, SetLastError:=True)> Friend Function MiniDumpWriteDump(ByVal hProcess As IntPtr, ByVal processId As Int32, ByVal hFile As SafeFileHandle, ByVal dumpType As NativeMiniDumpType, ByVal exceptionParam As IntPtr, ByVal userStreamParam As IntPtr,

Consistently running out of page file memory with full text indexer

Using MS SQL Server 2008 SP1 x64 Standard Edtion on Windows 2008 R2 Enterprise, I'm about to full-text index for the first time 1 table and 2 views. The table contains about 250'000 entries with a data space of 180 MB. As soon as I activate the full text indexing, the fdhost.exe task starts to consume slowly but surely all the available page file space (this can be easily watched using the Resource Monitor and the Commit Charge graph on the memory tab). Once all the virtual memory has been consumed, the server becomes unusable since it can't open any new windows any more, and RDP stops working. The machine specs are as follows: 12 GB of RAM 80 GB free on hard disk out of 136 GB 8 CPUs Custom size paging file with sizes between 24 GB - 60 GB (originally, this was system managed size, but then the server ran out of memory sooner) Max SQL server memory set to 6 GB (first 10 GB, then 8 GB) I've set the max fulltext crawl range to 8. During the indexing, the 8 CPUs are bit busy for a while, but not excessively. What is astonishing is that there is almost no use of physical memory during the indexing (I can see an increase from 2 GB to 3 GB which still leaves plenty of RAM available). Does anybody have an idea how I can convince fdhost.exe to consume physical memory and leave the paging memory alone? Or what else can I try?

online shared hosting sql server problem

 hi all             how to solve the problem in online sql server. A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)thank u

Problem importing text files with binary zeros (0x00) via SSIS(SQL2005). It is all fine when using D

Hi.   There is a "text" file generated by mainframe and it has to be uploaded to SQL Server. I've reproduced the situation with smaller sample. Let the file look like following: A17     123.17  first row          BB29    493.19  second             ZZ3     18947.1 third row is longer And in hex format: 00:  41 31 37 20 20 20 20 20 ? 31 32 33 2E 31 37 20 20  A17     123.17  10:  66 69 72 73 74 20 72 6F ? 77 0D 0A 42 42 32 39 20  first row??BB29 20:  20 00 20 34 39 33 2E 31 ? 39 20 20 73 65 63 6F 6E     493.19  secon30:  64 0D 0A 5A 5A 33 20 20 ? 20 20 20 31 38 39 34 37  d??ZZ3     1894740:  2E 31 20 74 68 69 72 64 ? 20 72 6F 77 00 69 73 20  .1 third row is 50:  6C 6F 6E 67 65 72       ?                          longer          I wrote "text" in quotes because sctrictly it is not pure text file - non-text binary zeros (0x00) happen sometimes instead of spaces (0x20).   The table is: CREATE TABLE eng ( src varchar (512) )   When i upload this file into SQL2000 using DTS or Import wizard, the table contains: select src, substring(src,9,8), len(src) from eng <               src                ><substr>             <len> A17     123.17  first row           123.17                  25BB29                                493.19                  22ZZ3     18947.1 third row           18947.1                 35   As one can see, everything was importe

Problem passing a text box value from aspx.cs page to SelectParameters in aspx page

Hi,I would like to take a value from a text box and pass it as a search parameter to my database. I get the value from my code behind page as follows: protected void btn_click(Object sender, ImageClickEventArgs e)      {           AccessDataSource1.SelectParameters["inputValue"].DefaultValue = TextBox1.Text;           string test = AccessDataSource1.SelectParameters["inputValue"].DefaultValue;                      //string inputValue = TextBox1.Text;          //Response.Write(inputValue);         // AccessDataSource1.SelectParameters.Add("@name", inputValue);          //Response.Write(@inputValue);                              } protected void btn_click(Object sender, ImageClickEventArgs e)     {          AccessDataSource1.SelectParameters["inputValue"].DefaultValue = TextBox1.Text;          //An alternate option I have used is          //string inputValue = TextBox1.Text;         // AccessDataSource1.Selec

ResGen.exe: Problem when compiling solution appears out of nowhere

  Hi guys!   I have a weird problem with my solution (or perhaps my machine?). When I try to compile my solution with embedded resources (two .docx documents), I receive the following error german error message: Die angegebene ausführbare Datei der Aufgabe "ResGen.exe" konnte nicht ausgeführt werden. Zugriff verweigert    my english translation: The executable file for the task "ResGen.exe" cannot be executed. Access denied. I have no idea, how to resolve this error. Does anyone have a clue? Regards, Florian P.S.: @moderators: I hope, I've posted in the right forum; if not, feel free to move this thread in the proper place.

A problem about CreateWindow - "balloon (tool) tip text window"

I dlike to use balloon tool tip text "TTM_ADDTOOL" in global environment. now..,I am using a code which works fine but in the main form - in my own app only..When i use mainwindowhandle of notepad it doesnt works - tooltip is not displayed. When my mouse cursor is away from my form and my mouse cursor is above notepad = tooltip is not displayed. Does exist any solution which will displaying baloon tipText on concrete coordinate? Any idea, solution, link..? more concrete.. I Tryed to create new tip window on concrete coordinate. Code is compiled., without errors, but new window is not visible. Somebody who can help me?   // Create an instance handle. Asm = Assembly.GetExecutingAssembly(); hInstance = Marshal.GetHINSTANCE(Asm.GetModules()[0]); // Create the ToolTip window. WinHandle = CreateWindowEx( WS_EX_TOPMOST, TOOLTIPS_CLASS, "Balloon Help Message" , WS_POPUP | TTS_NOPREFIX | TTS_BALLOON, 50, 50, 320, 240, IntPtr.Zero, IntPtr.Zero, hInstance, IntPtr.Zero); //display tool tip ShowWindow(WinHandle, 1);  

Problem with hosting wcf service using window service in window 7

Hi all! I have a wcf service, I hosted susessfuly in winxp, but in window 7, it throw an excaption like that Message="HTTP could not register URL http://+:8000/EchoService/. Your process does       not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). After that, I tried to run the  following command on window 7  to configure HTTP:             netsh http add urlacl url=http://+:8000/MyUri user=DOMAIN\userid I get error  Then, I run as Administrator and execute the above command, I get an error like here Create SDDL failed, Error: xxx The parameter is incorrect. I dont know why, and  how to fix the problem. Please help me!   Thanks all.    

Problem tabbing among text boxes with AJAX

We are having a problem with a form with four text boxes. If you enter a value in the first two boxes, pressing TAB as you switch between the text boxes, the data is retained in the text box as you would expect.  However, the third and fourth text boxes won't retain any data.  This happens in IE 8 but not FireFox 3.5.  The problem won't occur if you use the mouse to switch between text boxes. The problem goes away if we remove the AJAX code, but we want to retain the AJAX code so that some other things happen without postbacks.  I can upload a sample website if that will help, but I don't see where I can upload the files. We're using Visual Studio 2010 and VB.NET in an ASP.NET project.   Protected ToolkitScriptManager1.SetFocus(TextBox2)     Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChangedEnd Sub   ToolkitScriptManager1.SetFocus(TextBox3)     Protected Sub TextBox2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.TextChangedEnd Sub   ToolkitScriptManager1.SetFocus(TextBox4)      Protected Sub TextBox3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.TextChangedEnd Sub  

Problem running jquery script in Content Page

Hi!! I have a master page in asp.net and a content page with some basic asp.net controls like textbox,buttons,treeview....i have a jquery script in the content page and reference set to the jquery file..The script changes the text property of a button on the keydown event set for the textbox...the script works fine if i copy and paste it in a normal page...the script only ran once when i worte it for the first time the next day when i tried to run the script it was not working..i m facing this problem for running the script in content page and i a m not aware of how to write jquery script for the content page.. i m really not finding any solution where i am wrong i have even tried setting the internet explorer security setting to low..plz plz plz plz plz plz help me on Thanks!!

Problem in Rich Text box

Hi,     When i run this code, i am getting "Stack overflow Exception", Please any one correct this bug. Description:       My intention is i want to display red color for commented line. Example: Create Procedure SP_Accounts_Details    --Accounts  (     @in_target_source_inst INTEGER, --4855 )      Window.xaml <Window x:Class="RichTextBoxSample.Window1"   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   Title="Window1" Height="500" Width="1200">     <Grid>     <RichTextBox Height="436" Margin="12,64,-22,-38" Name="richTextBox1" Width="1188" TextChanged="richTextBox1_TextChanged"/>     <Button Height="23" HorizontalAlignment="Left" Margin="270,35,0,0" Name="btnClick" VerticalAlignment="Top" Width="75">Button</Button></Grid></Window> Window1.xaml using   System; using   System.Collections.Generic; using   System.Linq; using   System.Text; using   System.Windows; using   System.Win

Problem with EventSetter - "Failed to create a 'Handler' from the text" ...

I have a DataTrigger which when active sets the Template of a ListBox. Within the ListBox i then have a custom type which is based on a border. I wanted to get the MouseDown event for the Border, so in the custom type created a routed event which is fired when the MouseDown event occurs. Im using an EventSetter to hook this up and it compiles, however when ever the DataTrigger becomes active and the Template is changed i get an error: "Failed to create a 'Handler' from the text (name of method in code behind).   xaml: <ListBox x:Name="buttonDisplay" VerticalAlignment="Center" HorizontalAlignment="Center"> <ListBox.Resources> <Style x:Key="answerBtnStyle" TargetType="{x:Type cc:callControlButton}"> <EventSetter Event="borderClicked" Handler="ccAnswerBtn_MouseDown"/> </Style> </ListBox.Resources> <ListBox.Style> <Style TargetType="{x:Type ListBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate></ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=window,Path=currentCall.callstate}" Value="ringi

Help with running external Process from button click

We need assistance with a portion of a major web application project scheduled to begin user testing within 10 days.  The troublesome part of the code calls an external application when a button is clicked in Web page.  When run from a command prompt or bat file, the external application, App.exe, runs perfectly producing the desired result.  We created a test page and a small console application, Con.exe, to test the button code with a known quantity.  The test application runs perfectly when the button in the Web page is clicked.  However when we change the code to run App.exe instead of Con.exe, the App.exe code will not execute.  We even tried creating a bat file to execute App.exe.  Like the exe, the bat file executes from the command prompt or when double-clicked, but fails to run when called as a process from the button click event.  Can anyone assist us?  Here is the C# code: (.Net 3.5 sp1) using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Diagnostics;   namespace WebButtonTest {     public partial class _Default : System.Web.UI.Page  &nbs

Dynamic Text Boxes Creation Problem

Hi all, I am creating 5 textboxes in a row. A new creates when user press enter in the last textbox. I have taken a hidden text field and in OnKeyDown of last textbox I am assigning the combination of last textbox Id with the table count  to the hidden field and in VB Code I am checking whether the tableCount + Last textbox Id is equal to the hidden field or not then only I am generating the new row. here is the code In JavaScript On KeyDown of remarks textfield. function funcNewRow(id,count,e) {    var e = event || evt;    var charCode = e.which || e.keyCode;    if(charCode == 13){      e = cancelKey(e);      htxtBox.value = id + count;    } }   In VB Page_load method calling getTableRow() method   if htxtBox.value = "remarks" & (Tbl.Rows.Count + ViewState("TotalClearedItems")) Then  Tbl.Rows.Add(GetTableRow(Tbl.Rows.Count + 1 + ViewState(Panel1.Controls.Add(Tbl))  Panel1.Controls.add(Tbl) htxtBox.Value = "" end if   Here I have to implement a clear functionality such as each row at last contains a check box when user click the check box and press clear button the checked rows have to deleted .   The clear button code as follows : cnt = CInt(Tbl.Rows.Count)  For i = cnt To 1 Step -1 c = Pag
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend