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

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

converting from 32 bit os into 64 bit os

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
hii  My application is associated with windows media player and in system type:32 bit operating system it is running well. but in  system type:64 bit operating system this media player is not supporting and iam getting an exception "system.windows.forms.axhost.invalidactivexstate" .so, how should i make my application run successfully.

View Complete Post

More Related Resource Links

WebMatrix conversion failed when converting from a character string to uniqueidentifier?


I am trying to retrieve xml from a small function in my .cshtml page. Its throwing me an error. This however, runs fine in a console/form environment.

It takes 3 parameters and 1 exception.

myDll.GetXML(year, username, uniqueidentifier, out ex);

When I run this page I get the error, "Conversion failed when converting from a character string to uniqueidentifier."

Or a stack of.

System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting from a character string to uniqueidentifier.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

   at System.Data.SqlClient.SqlDataReader.get_MetaData()

   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBeha

Converting ReportDocument object into byte array ?


Hi All,

          Is it possible to convert the Report Document object as a byte array and store it in SQL , later retrieve and assing it to a report ?


Problems converting VS 2003 project to VS 2008



I'm having problems converting a VS 2003 project to VS 2008 (tried 2005 as well, same problem). There are several problems;
a) I don't have VS 2003 installed.
b) The project is a web service, however I'm not sure what type of VS project it was created as.
c) The general knowledge about the project setup is..slim.

I get a error message using the conversion wizard, however, I'm not familiar with the tool and I cannot quite find any good information on Google for it, so I am left with a error message I do not understand.

Conversion Issues - myProject.csproj:
Unable to open the Web site 'C:\local\path\to\project\myProject.csproj'. The Web site 'C:\local\path\to\project\myProject.csproj' does not exist.

The web service is not intended to run on the dev machine, it is copied to a test or a prod server. However, I do not know how this was done previously. I'm thinking that in order to convert, it has to access the server on which it should run (which is set somehow in a config maybe). But that doesn't actually make any sence..

If anyone could shed light on this, I would really appreciate it.

Thank you.

Converting Time formats


Hi guys,

So ive been converting an asp website to asp.net. What i did was run the migration wizard in the old VS2003, then when importing it bk into vs2008, i belive it upgraded it agin. I have been plodding along correcting basic erros and have come stuck with this one. Originallany the site has two input types, one for date and one for time. the new script is below with error im getting. I manged to get the date correct but the time is more tricky. Any suggestions would be appreciated.



Date = FormatdateTime(IIF(IsDBNull(MyRs1.Fields.Item("").Value), Nothing, MyRs1.Fields.Item("").Value), DateFormat.ShortDate)

Time = FormatdateTime(IIF(IsDBNull(MyRs1.Fields.Item("").Value), Nothing, MyRs1.Fields.Item("").Value), DateFormat.ShortTime)


Exception Details: System.InvalidCastException: Conversion from type 'Double' to type 'Date' is not valid.

Source Error:

Line 74: 
Line 75: 'TODO Need to correct the format 
Line 76:   Time= FormatDateTime(IIf(IsDBNull(MyRs1.Fields.Item("").Value), Nothing, MyR

Help converting vbscript to vb.net


Can anyone help me convert the below vbscript to vb.net:


On Error Resume Next

Dim sRunTime,sSitupCount,sPushupCount,sRunMin,sRunSec,sRunScore,sCompScore,sBodyComp
Dim iCompositeScore

Set oRE = New RegExp

sRunTime = InputBox("Enter your run time")
oRE.Pattern = "[0-5][0-9]:[0-5][0-9]"

If oRE.Test(sRunTime) = True Then
 WScript.Echo "Pattern Match"
 MsgBox "You must enter a valid run time in the following format: ""mm:ss""." & vbCr & "Please run the application again."
End If

sRunMin = Left(sRunTime,InStr(sRunTime,":")-1)
sRunSec = Right(sRunTime,InStr(sRunTime,":")-1)

sBodyComp = InputBox("Enter your waiste measurement")
oRE.Pattern = "[2-6][0-9].[0,5]"

If Len(sBodyComp) = 2 Then
 sBodyComp = sBodyComp + ".0"
End If

If oRE.Test(sBodyComp) = True Then
 WScript.Echo "Pattern Match"
 MsgBox "You must enter a waiste measurement in the following format: ""nn.n""." & vbCr & "Please run the application again."
End If

sSitupCount = InputBox

Converting from PHP to ASP


Dear all friends

 Hi to you all. I am now looking for not only your help but als your advices and suggestions to my situation.

here is the url of my current running PHP server http://www.yarnxchange.com/index.php

FIrst things I wish to know is which asp controls can replace the current PHP ones to act the same way

1.  In the top of the page the Latest news (News Ticker).

2. Under the banner logo the black line has a streamer that read data from database and view them in sme way like marquee and when roll over it stops and when click i can go to the details page.

3. In the bottom page The Yarn offers section . it shows data from mutiple tables but in the same place when click each item it displays the rows of its table in the right section . I think that there is a way or a data controller that can act the same way I wish your advice.

For sure after that I wish to know your ideas , recommendations and advices to make the full conversion in the best way

C# to VB: Converting to Boolean


I am converting some C# code to VB, the following code is part of a function

if (bool.Parse(v["Parent"].ToString()))
e.Row.CssClass = "Parent";

V is System.Data.DataRowView When I convert this to.

If Boolean.Parse(v("Parent").ToString()) Then
	e.Row.CssClass = "Parent"
End If

The code throws an error "String was not recognized as a valid Boolean" But if I use this code

If CBool(v("Parent").ToString) = True Then
e.Row.CssClass = "Parent"
End If

It works fine, which is great, I am just curious why?

Converting Crystal Report 2005 to 2008 - Please Tell Me I'm Stupid :)


Hello peeps,

  I have a series of Crystal Reports that I can view/edit using Visual Studio 2005 with no issues.  The method I'm using is to simply click on the *.rpt file and it opens in the VS crystal editor with no issues.  The problem I'm having is that we are upgrading to Visual Studio 2008, and when I open the *.rpt file in 2008 it opens as a binary file.  I guess I'm used to everything else in Visual Studio prompting me to convert the older version to the newer version, so I'm not sure what to do in this case.

  Is this normal?  Is there an easy conversion method that I'm simply overlooking?  Am I screwed?  Who invented liquid soap, and why?

Answers to any of these questions would be greatly appreciated...

Error converting data type varchar to numeric.


I create a form to record data using ASP.NET and SQL database...
when i run the project show error "Error converting data type varchar to numeric"

what's the problem actually.i try to change in datatype in database..
but still showing error...


problem when converting html to pdf using ItextSharp


 hi all

i have using itextsharp to convert html to pdf and its worked very good in english letters (A-Z) but when i trying to do it with arabic letters i have got empty pdf , can any one help me? what i should do ?

Converting UTC to another Time... in XSLT SharePoint designer using ddwrt


I am not a programmer, nor do I know any coding languages.  I have a slightly above average understanding of how writing code works, so please keep that in mind when responding.... 

I am using a list in SharePoint; when the list is updated, I want to display "UPDATED w/ Date and Time".  I cannot figure out how to display the Local Afghanistan time vice UTC or Zulu time. I am trying to figure out what to add in to change the time displayed +4:30 hours.  I am currently using the following code in XSLT with SharePoint Designer:

<xsl:if test="ddwrt:FormatDate(string(@Modified), number(1033), 1)=ddwrt:FormatDate(ddwrt:TodayIso(), number(1033), 1)">

   <xsl:if test="ddwrt:FormatDate(string(@Modified), number(1033), 1)!=ddwrt:FormatDate(string(@Created), number(1033), 1)">

   <Span style="background-color:maroon;color:white">UPDATED <xsl:value-of disable-output-escaping="no" select="@Modified" /></span>



Converting Word Documents to PDF using SharePoint Server 2010 and Word Services (Visual How To)

Watch the video and explore code as you learn how to programmatically convert Word documents to PDF format on the server by using Word Automation Services with SharePoint Server 2010.

Sample: Converting Word Documents to PDF using SharePoint Server 2010 and Word Automation Services

Explore the code in this visual how-to article as you learn how to programmatically convert Word documents to PDF format on the server by using Word Automation Services with SharePoint Server 2010.

Video: Converting Word Documents to PDF Format Using SharePoint Server 2010 and Word Services

Watch this visual how-to video as you learn how to programmatically convert Word documents to PDF format on the server by using Word Automation Services with SharePoint Server 2010. (Length: 6:15)

How to handle null while converting from my datatable to List<> using LINQ


I am converting my datatable to LISt using LINQ
how do I handle nulls coming from database

List<Port> portDetails = new List<Port>();
DataTable dt = ds.Tables[0];               
portDetails = (from q in dt.AsEnumerable()
select new Port
PortCode = q.Field<string>("Code"),
ExtCode = q.Field<string>("Nb"),
Name = q.Field<string>("Name"))

In the above query if Code is null I do not want property
portcode to be set to the value it should only set if it is
not null or not blank 
PortCode = q.Field<string>("Code"),

What should be syntax
I was trying somethign like this which doesnt work
Portcode = q.Field<bool>("Code") == null ? null : q.Field<bool>("Code")


Converting PNG to Transparent PNG


Hi there,

I have a bunch of PNG images and i want the background for each one to be transparent. At the moment they all have white background and i want to remove that. Can this be done programatically possibly with the help of some imaging component.

Thanks in advance.


Converting a byte array to a gif


Hi there,

I am currently in the process of trying to convert a byte array into a gif format. So far I have done this:

                        byte[] gif = Convert.FromBase64String(myByteArray);
                        MemoryStream ms = new MemoryStream(gif);
                        Bitmap image = new Bitmap(ms);
                        string pathToSave = Server.MapPath("~/_temp/");
                        iconUrl = string.Format("{0}/{1}.gif", pathToSave, fileName);

When this code block executes, I get the following error:

A generic error occurred in GDI+.

I have made sure that I have the correct permissions for the _temp folder, but I am not sure if I am trying to convert "bad bytes". Could someone perhaps shed some light on this error? 

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