Migrate from Other Web Technologies to ASP.NEThttp://forums.asp.net/29.aspx/1?Migrate+from+Other+Web+Technologies+to+ASP+NETDiscuss moving to ASP.NET from classic ASP, PHP, JSP, Cold Fusion, older versions of ASP.NET, or any other web technology.Tue, 07 May 2013 12:38:37 -0400urn:uuid:00000000-0000-0000-0000-000000000029urn:uuid:00000000-0000-0000-0000-000003616518http://forums.asp.net/p/1514058/3616518.aspx/1?HOW+TO+INSTALL+THE+MIATRTION+TOOLHOW TO INSTALL THE MIATRTION TOOL <p>when i am installing the Setup.msi, it required to install asp to asp.net migration assistant on your pc.<br> So i download ASP to ASP.NET Migration Asssitant Training.msi and try to install it, but it said the installer was interrupted before asp to asp.net migration assistant training could be installed, you need to restart the installer to try again. I only click &quot;Close&quot; to exit.<br> Can you help me how to do?</p> 2010-01-14T02:39:58-05:002010-01-14T02:39:58.457-05:00urn:uuid:00000000-0000-0000-0000-000004377324http://forums.asp.net/p/1671447/4377324.aspx/1?Convert+Windows+Application+into+Web+Application+with+Code+Convert Windows Application into Web Application with Code <p>Dear All,</p> <p>&nbsp;</p> <p>I have a Windows Application and i got a requirement to convert all forms in Windows application to Web Application including code written in windows application. How can we do this. please do needful...</p> 2011-04-10T09:05:16-04:002011-04-10T09:05:16.583-04:00urn:uuid:00000000-0000-0000-0000-000005378965http://forums.asp.net/p/1902580/5378965.aspx/1?How+to+execute+multiple+parameterized+stored+procedures+within+a+single+transaction+using+ADODBHow to execute multiple parameterized stored procedures within a single transaction using ADODB <p>Hi There,</p> <p>I am trying to port over a classic ASP application to .Net and it has been pretty smooth so far. (I know ideally this should be rewritten in ADO.Net but we do not have the time for that at the moment.)</p> <p>One method requires a&nbsp;bunch of&nbsp;queries&nbsp;to be executed within&nbsp;a single&nbsp;transaction. The original code as is works just fine but I also need to address a SQL injection issue with it and implement parameterized queries.</p> <p>Original code: (Works fine)</p> <pre class="prettyprint">Sub UpdateSortOrder() Dim sqlstr As String, x As Integer Dim cn = Server.CreateObject(&quot;ADODB.Connection&quot;) cn.Open(Application(&quot;Conn_ConnectionString&quot;)) Dim rs = Server.CreateObject(&quot;ADODB.RecordSet&quot;) rs.CursorType = 3 rs.ActiveConnection = cn cn.BeginTrans() For x = 1 To UBound(Session(&quot;DivisionsArray&quot;)) sqlstr = &quot;EXEC SPName&quot; &amp; _ &quot;@Param1 = 'value1',&quot; &amp; _ &quot;@Param2 = &quot; &amp; Value2 &amp; &quot;&quot;) cn.Execute(sqlstr) Next cn.CommitTrans() cn.Close() End Sub</pre> <p>Updated Code: Gives error: <em><strong>COUNT field inccorrect or syntax error</strong></em>. It however seems to me that once cannot pass parameters to Connection object.</p> <pre class="prettyprint">Sub UpdateSortOrder() Dim sqlstr As String, x As Integer, cn As New ADODB.Connection() cn.Open(Application("Conn_ConnectionString")) cn.BeginTrans() For x = 1 To UBound(Session("DivisionsArray")) Dim rs As New ADODB.RecordSet(), cmd As New ADODB.Command() cmd.CommandText = "SPName" cmd.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc cmd.Parameters.Append(cmd.CreateParameter("@Param1", ADODB.DataTypeEnum.adVarChar, ADODB.ParameterDirectionEnum.adParamInput, 10, value1)) cmd.Parameters.Append(cmd.CreateParameter("@Param2", ADODB.DataTypeEnum.adUnsignedTinyInt, ADODB.ParameterDirectionEnum.adParamInput, 1, value2)) cn.execute(cmd.CommandText, 1, cmd.CommandType) cmd = Nothing Next cn.CommitTrans() cn.Close() End Sub</pre> <p><br />If I try this instead, I get the below error:</p> <p><em><strong>The connection cannot be used to perform this operation. It is either closed or invalid in this context.</strong></em></p> <pre class="prettyprint"> Sub UpdateSortOrder() Dim sqlstr As String, x As Integer, cn As New ADODB.Connection() cn.Open(Application("Conn_ConnectionString")) cn.BeginTrans() For x = 1 To UBound(Session("DivisionsArray")) Dim rs As New ADODB.RecordSet(), cmd As New ADODB.Command() rs.CursorType = 3 rs.ActiveConnection = cn cmd.CommandText = "SPName" cmd.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc cmd.Parameters.Append(Param1) cmd.Parameters.Append(Param2) rs = cmd.Execute() cmd = Nothing rs = Nothing Next cn.CommitTrans() cn.Close() End Sub</pre> <p></p> <p>&nbsp;</p> <p>&nbsp;</p> 2013-04-29T17:26:08-04:002013-04-29T17:26:08.847-04:00urn:uuid:00000000-0000-0000-0000-000005378989http://forums.asp.net/p/1902584/5378989.aspx/1?Converting+classic+ASP+to+ASP+Net+questions+Converting classic ASP to ASP.Net questions <p>&nbsp;</p> <p>&nbsp;</p> <p>I&nbsp;have never coded in classic so I hope this is the correct forum.&nbsp; What I need to do is convert to ASP.Net and there are some methods that are depricated or not available and some of those I am trying to get around.&nbsp; What this part of the app is supposed to do is use iTextSharp.dll to create a PDF and display on the bottom of the page.&nbsp; Here is the old code and some conversion (hope I did it correctly if not please correct me :) )</p> <pre class="prettyprint">private void WriteDocumentWithStreaming(ref SqlConnection conn, int ConfID) { SqlParameter param = null; SqlCommand cmd = new SqlCommand(SQLData.spGetPDF, conn); cmd.CommandType = CommandType.StoredProcedure; param = new SqlParameter(&quot;@ConfID&quot;, SqlDbType.NVarChar, 100); param.Direction = ParameterDirection.Input; param.Value = ConfID; cmd.Parameters.Add(param); SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection); if (reader.HasRows) { reader.Read(); TextWriter tw; HttpResponse Response = new HttpResponse(tw); Response.Buffer = false; Response.ClearHeaders(); Response.ContentType = &quot;Application/pdf&quot;; const int ChunkSize = 1024; byte[] buffer = new byte[ChunkSize]; byte[] binary = (reader[&quot;PDFContent&quot;]) as byte[]; MemoryStream ms = new MemoryStream(binary); int SizeToWrite = ChunkSize; for (int i = 0; i &lt; binary.GetUpperBound(0) - 1; i = i &#43; ChunkSize) { if (!Response.IsClientConnected) { return; } if (i &#43; ChunkSize &gt;= binary.Length) { SizeToWrite = binary.Length - i; } byte[] chunk = new byte[SizeToWrite]; ms.Read(chunk, 0, SizeToWrite); Response.BinaryWrite(chunk); Response.Flush(); } Response.Close(); } reader.Close(); }</pre> <pre class="prettyprint">&nbsp;don't see where this is actually writing somewhere.</pre> <p>Also, what control do I use to display?</p> <p>It was originally this way:</p> <pre class="prettyprint">sLink = "./PDFConfirmations/default.aspx?cid=" &amp; requestLong("confirmation_id") response.write "&lt;iframe src=""" &amp; sLink &amp; """ width=""100%"" height=""50%"" &gt;&lt;/iframe&gt;"</pre> <p></p> <p></p> 2013-04-29T17:48:36-04:002013-04-29T17:48:36.013-04:00urn:uuid:00000000-0000-0000-0000-000004960955http://forums.asp.net/p/1799066/4960955.aspx/1?how+to+convert+pdf+to+jpg+in+asp+net+how to convert pdf to jpg in asp.net.. <p>i want to convert pdf page convert in to jpg..</p> <p></p> 2012-05-02T06:17:45-04:002012-05-02T06:17:45.917-04:00urn:uuid:00000000-0000-0000-0000-000005367122http://forums.asp.net/p/1899792/5367122.aspx/1?32+bit+DLL+on+64+bit+Windows+832 bit DLL on 64 bit Windows 8 <ul> <li>IIS 8 </li><li>asp.net framework 4.0 </li><li>Windows Server 2012 </li></ul> <p>I have a legacy dll I need to execute, here is the C# I am trying to use</p> <pre class="prettyprint">[DllImport(@&quot;codegen.dll&quot;)] public static extern string CreateCode2( int level, string name, string encrypt_template, Int64 hardwareID, int otherinfo1, int otherinfo2, int otherinfo3, int otherinfo4, int otherinfo5 );</pre> <p>I have placed the 32 bit DLL in the /bin folder, the website root, AND c:\windows\system32.</p> <p>I have enabled 32 bit apps as mentioned here <a href="http://stackoverflow.com/questions/13828135/register-com-dll-on-windows-server-2008-64-bit">http://stackoverflow.com/questions/13828135/register-com-dll-on-windows-server-2008-64-bit</a></p> <p>Yet - over and over, I get this when trying to invoke my page.</p> <pre class="prettyprint">Server Error in '/' Application. Unable to load DLL 'codegen.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) 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.DllNotFoundException: Unable to load DLL 'codegen.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Source Error: Line 135: if (long.TryParse(sfp, out lfp)) Line 136: { Line 137: unlockingcode = CreateCode2((int)1, regname, encrypt_template, lfp, 0, 0, 0, 0, 0); Line 138: } Line 139: Source File: xxxx Line: 137 Stack Trace: [DllNotFoundException: Unable to load DLL 'codegen.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)] classicReceipt.CreateCode2(Int32 level, String name, String encrypt_template, Int64 hardwareID, Int32 otherinfo1, Int32 otherinfo2, Int32 otherinfo3, Int32 otherinfo4, Int32 otherinfo5) +0 </pre> <p>The DLL is in 3 places, including the search path, there is just NO WAY that it &quot;could not be found&quot;.&nbsp; My mind is going to &quot;permissions&quot;, but how do I debug that?</p> <p><em>update</em>:</p> <p>I went into &quot;Handler Mappings&quot; and added a handler for:</p> <ul> <li>*.DLL </li><li>CodeGen.DLL </li><li>read/write/script/execute </li></ul> <p>No change.</p> <p>oh and before anyone suggests it, this DLL does not need to be registered.</p> 2013-04-17T16:34:46-04:002013-04-17T16:34:46.353-04:00urn:uuid:00000000-0000-0000-0000-000005134536http://forums.asp.net/p/1840648/5134536.aspx/1?Populate+Excel+Sheet+with+ASP+NET+C+Populate Excel Sheet with ASP.NET (C#) <p>Hello,</p> <p>I can populate the page, but I cannot save an excel file so that I can use that excel file to open up for the user.&nbsp; I can save a PDF file, but not an excel file.&nbsp; I am using Microsoft.Office.Interop.Excel to generate an excel page.</p> <p>Please help.&nbsp; I cannot save that file or have it popup so that the user can save the file.</p> <p>Thank you so much,</p> <p>Cristina</p> <p>P.S. CODE is BELOW........................................................................</p> <p>using System;<br> using System.Collections.Generic;<br> using System.Linq;<br> using System.Web;<br> using System.Collections;<br> using System.Data;<br> using System.Runtime.CompilerServices;<br> using System.Data.SqlClient;<br> using System.Windows.Forms;<br> using System.Reflection;<br> using Excel = Microsoft.Office.Interop.Excel;<br> using System.Windows.Forms;<br> using System.Collections;</p> <p>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;<br> &nbsp;&nbsp;&nbsp; /// public static void makeWorkbook(ArrayList aktRecords, Hashtable recCount, int numWorkbooks)<br> &nbsp;&nbsp;&nbsp; /// <br> &nbsp;&nbsp;&nbsp; /// make the workbook from the array that was generated.<br> &nbsp;&nbsp;&nbsp; /// &lt;/summary&gt;<br> &nbsp;&nbsp;&nbsp; /// &lt;param name=&quot;aktRecords&quot;&gt;&lt;/param&gt;<br> &nbsp;&nbsp;&nbsp; /// &lt;param name=&quot;recCount&quot;&gt;&lt;/param&gt;<br> &nbsp;&nbsp;&nbsp; /// &lt;param name=&quot;numWorkbooks&quot;&gt;&lt;/param&gt;<br> &nbsp;&nbsp;&nbsp; public static void makeWorkbook(ArrayList aktRecords, Hashtable recCount)<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Declare these two variables globally so you can access them from both<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Button1 and Button2.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Excel.Application objApp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Excel._Workbook objBook;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Excel.Workbooks objBooks;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Excel.Sheets objSheets;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Excel._Worksheet objSheet;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Excel.Range range;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instantiate Excel and start a new workbook.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objApp = new Excel.Application();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (objApp == null)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Uncomment the line below if you want to see what's happening in Excel<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objApp.Visible = true;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objBooks = objApp.Workbooks;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objBook = objBooks.Add(Missing.Value);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheets = objBook.Worksheets;<br> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int i = 0;&nbsp; // each site array.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String siteCode;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (String[,] ary in aktRecords.ToArray())<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; siteCode = ary[1, 12];<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int count = (int)recCount[siteCode];<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet = (Excel.Worksheet)objSheets.Add(Missing.Value);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet = (Excel._Worksheet)objSheets.get_Item(1);<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range = objSheet.get_Range(&quot;A1&quot;, Missing.Value);<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range = range.get_Resize(count &#43; 1, 12);<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Set the range value to the array.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range.set_Value(Missing.Value, ary);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.get_Range(&quot;A1&quot;, &quot;K1&quot;).Font.Bold = true;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.get_Range(&quot;A1&quot;, &quot;K1&quot;).HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.get_Range(&quot;G1&quot;, &quot;K1&quot;).ColumnWidth = 25;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.get_Range(&quot;B1&quot;, &quot;F1&quot;).ColumnWidth = 10;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.get_Range(&quot;A1&quot;).ColumnWidth = 12;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.get_Range(&quot;I1&quot;).ColumnWidth = 10;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objSheet.Name = siteCode;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Return control of Excel to the user.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objApp.Visible = true;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objApp.UserControl = true;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (Exception theException)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String errorMessage;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errorMessage = &quot;Error: &quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errorMessage = String.Concat(errorMessage, theException.Message);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errorMessage = String.Concat(errorMessage, &quot; Line: &quot;);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errorMessage = String.Concat(errorMessage, theException.Source);<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //MessageBox.Show(errorMessage, &quot;Error&quot;);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> &nbsp;&nbsp;&nbsp; }</p> 2012-09-05T14:00:51-04:002012-09-05T14:00:51.143-04:00urn:uuid:00000000-0000-0000-0000-000005363614http://forums.asp.net/p/1898993/5363614.aspx/1?exe+painexe pain <p>Through a series of unfortunate events, I now have to write a .exe program to call from a classic ASP site.</p> <p>my IIS 8 server REFUSES to execute it no matter what settings and permissions I grant.&nbsp;</p> <p>I am trying to execute this exe in an iframe with a call that looks like this (based on my old Delphi CGI App.</p> <pre class="prettyprint">http://mysite.com/cgi-bin/program.exe/getcode.html?ORDERID=1647</pre> <p>I PROMISE you that the exe is there in the right folder, yet I get</p> <pre class="prettyprint">HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. </pre> <p>I have tried this in and out of the IFRAME and get the same result.</p> <p>the EXE I have written is not complicated, and should return SOMETHING, even if it gets an error internally.&nbsp; I just think Windows is refusing to execute it.</p> <p>I am TOTALLY NEW to IIS8 so feel free to help me out with the details of what I need to do.<br> <br> <br> </p> 2013-04-15T00:45:02-04:002013-04-15T00:45:02.52-04:00urn:uuid:00000000-0000-0000-0000-000005352296http://forums.asp.net/p/1895329/5352296.aspx/1?php+to+as+net+converterphp to as.net converter <p>Hi</p> <p>I have a very big php website which I want to convert it into asp.net or asp.net MVC. Can anybody suggest if there is any free tool which can automate this job.</p> <p>&nbsp;</p> <p>Regards,</p> <p>Krishna.</p> 2013-04-04T06:16:15-04:002013-04-04T06:16:15.63-04:00urn:uuid:00000000-0000-0000-0000-000004794320http://forums.asp.net/p/1761136/4794320.aspx/1?Any+regrets+about+leaving+the+LAMP+stack+Any regrets about leaving the LAMP stack? <p>I've worked with .NET a pretty good amount now. &nbsp;I've put a lot of hours into learning about the platform. &nbsp;It's shocking to say, but thousands of hours. &nbsp;This has included tutorials, books, classses, countless hours debugging...etc. &nbsp;I feel like I've come a really long way. &nbsp;I also now that I have a lot further to go to be an &quot;Enterprise&quot; level guy. &nbsp;I wonder if i really want to be an &quot;Enterprise&quot; level guy.</p> <p>I'm starting to wonder if the LAMP stack would be better suited for me. &nbsp; My impression is that the php based stuff may be simpler. &nbsp;It's also that WordPress may be pretty easy to deliver stuff more quickly. &nbsp;These impressions may be completely inaccurate. &nbsp;The open source aspect is also very cool.</p> <p>The .NET Framework and all of the other technologies used with it, SQL Server, ASP.net...etc, are incredible. &nbsp;The breadth and capabilities of them are phenominal. &nbsp;But the complexity seems like it can get tremendous.</p> <p>Does anyone have any regrets about moving from the LAMP stack or any other thoughts on this? &nbsp;Is the PHP world a simpler world?&nbsp;</p> 2012-01-21T03:02:39-05:002012-01-21T03:02:39.307-05:00urn:uuid:00000000-0000-0000-0000-000005286982http://forums.asp.net/p/1879085/5286982.aspx/1?From+Java+to+C+Calling+a+web+APIFrom Java to C# Calling a web API <p>Hi,</p> <p>This piece of code I have&nbsp;written to make a request doesn't work. I have an example on Java but there are pieces of the code that I can't translate. Here is the sample code:</p> <pre class="prettyprint">URL url = new URL (“http://www.costco.com”); String encodingStyleURI = Constants.NS_URI_SOAP_ENC; // Build the call. Call call = new Call (); call.setTargetObjectURI (&quot;/ urn/ services&quot;); call.setMethodName (&quot;POST&quot;); call.setEncodingStyleURI(encodingStyleURI); // Make the call Response resp = call.invoke (/* router URL */ url, /* actionURI */ &quot;&quot; ); // Check the response. Parameter result = resp.getReturnValue(); System.out.println (result.getValue ()); }</pre> <p>How can I translate &quot;String encodingStyleURI = Constants.NS_URI_SOAP_ENC;&quot; and &quot;call.setEncodingStyleURI(encodingStyleURI);&quot; from java to C#??</p> <p>I'm calling an Apache server with soap services I guess.</p> <p>Any help please! Thank you</p> 2013-01-30T16:32:42-05:002013-01-30T16:32:42.163-05:00urn:uuid:00000000-0000-0000-0000-000005334890http://forums.asp.net/p/1891112/5334890.aspx/1?PHP+curl_Init+to+asp+net+4+0PHP curl_Init to asp.net 4.0 <p>Hi</p> <p>I need help to translate PHP to asp.net 4.0. I would appreciate some code or examples that can help me to work it out.</p> <pre class="prettyprint">/Connection Resource //http://docs.oneall.com/api/resources/connections/read-connection-details/ $resource_uri = 'https://'.$site_domain.'/connections/'.$token .'.json'; //Setup connection $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $resource_uri); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_USERPWD, $site_public_key . &quot;:&quot; . $site_private_key); curl_setopt($curl, CURLOPT_TIMEOUT, 15); curl_setopt($curl, CURLOPT_VERBOSE, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($curl, CURLOPT_FAILONERROR, 0); //Send request $result_json = curl_exec($curl); //Error if ($result_json === false) { //You may want to implement your custom error handling here echo 'Curl error: ' . curl_error($curl). '&lt;br /&gt;'; echo 'Curl info: ' . curl_getinfo($curl). '&lt;br /&gt;'; curl_close($curl); } //Success else { //Close connection curl_close($curl); //Decode $json = json_decode ($result_json); //Extract data $data = $json-&gt;response-&gt;result-&gt;data; //Check for plugin if ($data-&gt;plugin-&gt;key == 'social_login') { //Operation successfull if ($data-&gt;plugin-&gt;data-&gt;status == 'success') { //The token of the user that signed in/up using his social network account $user_token = $data-&gt;user-&gt;user_token; // 1] Check if you have a userID for this token in your database $user_id = GetUserIdForUserToken($user_token); // 2.1] If the userID is empty then this is the first time that this user signs in if ($user_id === null)</pre> <p><br> Many thanks in advance</p> <p>Emil</p> <p></p> 2013-03-17T09:41:21-04:002013-03-17T09:41:21.007-04:00urn:uuid:00000000-0000-0000-0000-000005295054http://forums.asp.net/p/1881044/5295054.aspx/1?php+to+asp+solution+php to asp solution!!! <p>Good morning to all of the knowledge I request all of you, is that I need to convert an application that I have in php to asp.net and the only way I've seen that has worked for many people is with PHP to ASP.NET 1.x Migration Assistant but when trying to install will not let me. I thank all of you if I cooperate or tell me a way to convert php code to visual.net.</p> 2013-02-07T15:23:17-05:002013-02-07T15:23:17.237-05:00urn:uuid:00000000-0000-0000-0000-000005332501http://forums.asp.net/p/1889767/5332501.aspx/1?Using+IKVM+librariesUsing IKVM libraries <p>Apparently, some of the lib work fine, and when i run in eclipse it works fine.</p> <p>but when i add the lib in asp.net and use the functions</p> <p>which opens a jdbc connection it does not work</p> <p>&nbsp;</p> <p>had added</p> <p>the ikvm core /jdbc to the reference</p> 2013-03-15T09:35:19-04:002013-03-15T09:35:19.85-04:00urn:uuid:00000000-0000-0000-0000-000005323128http://forums.asp.net/p/1887571/5323128.aspx/1?Convert+VBScript+Code+into+Asp+Net+C+Convert VBScript Code into Asp.Net C# <pre style="font-family:Consolas; font-size:13; color:black; background:white"><span style="color:blue">Sub</span>&nbsp;GetPhotos(category) <span style="color:blue">Dim</span>&nbsp;template,&nbsp;xsl <span style="color:blue">Set</span>&nbsp;xsl&nbsp;=&nbsp;Server.CreateObject(<span style="color:maroon">&quot;Msxml2.FreeThreadedDOMDocument&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xsl.async&nbsp;=&nbsp;<span style="color:blue">false</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xsl.load&nbsp;Server.MapPath(<span style="color:maroon">&quot;photogallery/photos.xslt&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">Set</span>&nbsp;template&nbsp;=&nbsp;Server.CreateObject(<span style="color:maroon">&quot;MSXML2.XSLTemplate&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;template.stylesheet&nbsp;=&nbsp;xsl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue">Dim</span>&nbsp;doc&nbsp; <span style="color:blue">Set</span>&nbsp;doc&nbsp;=&nbsp;Server.CreateObject(<span style="color:maroon">&quot;Msxml2.FreeThreadedDOMDocument&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;doc.async&nbsp;=&nbsp;<span style="color:blue">False</span> &nbsp;&nbsp;&nbsp;&nbsp;doc.load(&nbsp;Server.MapPath(<span style="color:maroon">&quot;photogallery/photos.xml&quot;</span>)&nbsp;) &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">Dim</span>&nbsp;proc&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">Set</span>&nbsp;proc&nbsp;=&nbsp;template.createProcessor() &nbsp;&nbsp;&nbsp;&nbsp;proc.input&nbsp;=&nbsp;doc &nbsp;&nbsp;&nbsp;&nbsp;proc.output&nbsp;=&nbsp;Response proc.addParameter&nbsp;<span style="color:maroon">&quot;category&quot;</span>,&nbsp;category &nbsp;&nbsp;&nbsp;&nbsp;proc.transform &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">End</span>&nbsp;<span style="color:blue">Sub</span></pre> 2013-03-06T05:19:14-05:002013-03-06T05:19:14.203-05:00urn:uuid:00000000-0000-0000-0000-000005304878http://forums.asp.net/p/1883302/5304878.aspx/1?how+to+Conver+the+Code+from+PHP+to+C+NEThow to Conver the Code from PHP to C#.NET <p>function sendChat() {<br> &nbsp;&nbsp; &nbsp;&#36;from = &#36;_SESSION['username'];<br> &nbsp;&nbsp; &nbsp;&#36;to = &#36;_POST['to'];<br> &nbsp;&nbsp; &nbsp;&#36;message = &#36;_POST['message'];<br> <br> &nbsp;&nbsp; &nbsp;&#36;_SESSION['openChatBoxes'][&#36;_POST['to']] = date('Y-m-d H:i:s', time());<br> &nbsp;&nbsp; &nbsp;<br> &nbsp;&nbsp; &nbsp;&#36;messagesan = sanitize(&#36;message);<br> <br> &nbsp;&nbsp; &nbsp;if (!isset(&#36;_SESSION['chatHistory'][&#36;_POST['to']])) {<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&#36;_SESSION['chatHistory'][&#36;_POST['to']] = '';<br> &nbsp;&nbsp; &nbsp;}<br> <br> &nbsp;&nbsp; &nbsp;&#36;_SESSION['chatHistory'][&#36;_POST['to']] .= &lt;&lt;&lt;EOD<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&quot;s&quot;: &quot;1&quot;,<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&quot;f&quot;: &quot;{&#36;to}&quot;,<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&quot;m&quot;: &quot;{&#36;messagesan}&quot;<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; },<br> EOD;<br> <br> <br> &nbsp;&nbsp; &nbsp;unset(&#36;_SESSION['tsChatBoxes'][&#36;_POST['to']]);<br> <br> &nbsp;&nbsp; &nbsp;&#36;sql = &quot;insert into chat (chat.from,chat.to,message,sent) values ('&quot;.mysql_real_escape_string(&#36;from).&quot;', '&quot;.mysql_real_escape_string(&#36;to).&quot;','&quot;.mysql_real_escape_string(&#36;message).&quot;',NOW())&quot;;<br> &nbsp;&nbsp; &nbsp;&#36;query = mysql_query(&#36;sql);<br> &nbsp;&nbsp; &nbsp;echo &quot;1&quot;;<br> &nbsp;&nbsp; &nbsp;exit(0);<br> }</p> 2013-02-17T11:29:51-05:002013-02-17T11:29:51.95-05:00urn:uuid:00000000-0000-0000-0000-000005322219http://forums.asp.net/p/1887352/5322219.aspx/1?Convert+this+Code+into+Asp+Net+C+Convert this Code into Asp.Net C#......... <pre style="font-family:Consolas; font-size:13; color:black; background:white"><span style="color:blue">Sub</span>&nbsp;GetPhotos(category) <span style="color:blue">Dim</span>&nbsp;template,&nbsp;xsl <span style="color:blue">Set</span>&nbsp;xsl&nbsp;=&nbsp;Server.CreateObject(<span style="color:maroon">&quot;Msxml2.FreeThreadedDOMDocument&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xsl.async&nbsp;=&nbsp;<span style="color:blue">false</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xsl.load&nbsp;Server.MapPath(<span style="color:maroon">&quot;photogallery/photos.xslt&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">Set</span>&nbsp;template&nbsp;=&nbsp;Server.CreateObject(<span style="color:maroon">&quot;MSXML2.XSLTemplate&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;template.stylesheet&nbsp;=&nbsp;xsl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:blue">Dim</span>&nbsp;doc&nbsp; <span style="color:blue">Set</span>&nbsp;doc&nbsp;=&nbsp;Server.CreateObject(<span style="color:maroon">&quot;Msxml2.FreeThreadedDOMDocument&quot;</span>) &nbsp;&nbsp;&nbsp;&nbsp;doc.async&nbsp;=&nbsp;<span style="color:blue">False</span> &nbsp;&nbsp;&nbsp;&nbsp;doc.load(&nbsp;Server.MapPath(<span style="color:maroon">&quot;photogallery/photos.xml&quot;</span>)&nbsp;) &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">Dim</span>&nbsp;proc&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">Set</span>&nbsp;proc&nbsp;=&nbsp;template.createProcessor() &nbsp;&nbsp;&nbsp;&nbsp;proc.input&nbsp;=&nbsp;doc &nbsp;&nbsp;&nbsp;&nbsp;proc.output&nbsp;=&nbsp;Response proc.addParameter&nbsp;<span style="color:maroon">&quot;category&quot;</span>,&nbsp;category &nbsp;&nbsp;&nbsp;&nbsp;proc.transform &nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue">End</span>&nbsp;<span style="color:blue">Sub</span></pre> 2013-03-05T10:52:36-05:002013-03-05T10:52:36.247-05:00urn:uuid:00000000-0000-0000-0000-000005321502http://forums.asp.net/p/1887196/5321502.aspx/1?Migration+of+1+1+to+4+0+FrameworkMigration of 1.1 to 4.0 Framework <p>Hi,</p> <p>When&nbsp;migrating 1.1 to 4.0 Framework from visual studio,all&nbsp;obsolete methods calls are shown in warnings. Does Microsoft provides support for the obsolete methods in case of any issues or should those&nbsp;warning&nbsp;needs to changed as per the recommendation.</p> <p>A quick response is highly appreciated.</p> <p>&nbsp;</p> 2013-03-04T20:16:41-05:002013-03-04T20:16:41.553-05:00urn:uuid:00000000-0000-0000-0000-000005329294http://forums.asp.net/p/1889070/5329294.aspx/1?Delay+migration+by+using+C+NET+code+in+Classic+ASP+pages+COM+Interop+Delay migration by using C# .NET code in Classic ASP pages (COM Interop) <p>We have a large amount of ASP pages and instead of taking a lot of time and effort of converting them all to ASP.NET, we would like to quickly be able to utilize some functionality from .NET Framework 4.0.</p> <p>I didn't think this would be that difficult, but I'm unable to call my test DLL (that is written in C# under 4.0 framework) in my Classic ASP page. I've come across several articles outlining various steps. &nbsp;Here's what I've done so far:</p> <p>1) Adjusted the Assembly.cs to have ComVisible(true)<br> 2) Compiled the DLL<br> 3) regasm Tester.dll /tlb: Tester.tlb<br> 4) gacutil /i Tester.dll&nbsp;<br> 5) added code to classic ASP page:</p> <p>dim foo<br> set foo = Server.CreateObject(&quot;Tester.Numbers&quot;)&nbsp;</p> <p>Below is the original page where I got the code for my test DLL:</p> <p><a href="http://www.codeproject.com/Articles/3511/Exposing-NET-Components-to-COM">http://www.codeproject.com/Articles/3511/Exposing-NET-Components-to-COM</a></p> <p>Can anyone see anything I'm missing? &nbsp;Thanks.</p> 2013-03-12T15:36:28-04:002013-03-12T15:36:28.103-04:00urn:uuid:00000000-0000-0000-0000-000005329137http://forums.asp.net/p/1889044/5329137.aspx/1?Help+a+classic+ASP+person+understand+QueryString+Parameters+in+ASP+netHelp a classic ASP person understand QueryString Parameters in ASP.net <p><span>Hello, I am only familiar with classic ASP and am trying to learn how to upgrade my site. We will eventually be upgrading to SQL server, but for now, we are connecting to an access database.</span><br> <br> <span>My question is how to create dynamic SQL statements based on QueryString variables. In the past with classic ASP I would do something like the following. It would allow me to build a search page where the user could select any one of many different search combinations. All the values would pass through the querystring and then based on what the user selected, I could create the proper SQL statement.</span></p> <pre class="prettyprint">If Request.QueryString(&quot;pony&quot;) &lt;&gt; &quot;&quot; Then mySQL = &quot;SELECT * FROM myTable INNER JOIN myPony on myTable.petID = myPony.petID WHERE pony LIKE '&quot; &amp; Request.QueryString(&quot;pony&quot;) &amp; &quot;'&quot; Else mySQL = &quot;SELECT * FROM myTable INNER JOIN myHorse on myTable.petID = myHorse.petID WHERE horse LIKE '&quot; &amp; Request.QueryString(&quot;horse&quot;) &amp; &quot;'&quot; End if</pre> <p><span><span>I'm not sure how do do the equivalent in ASP.net. I've got a SqlDataSource and can add a QueryStringParameter like the following, however, I'm not sure how to make it "dynamic" to accommodate any number of different search parameters entered by the user.</span></span></p> <pre class="prettyprint">&lt;asp:SqlDataSource ID="results" runat="server" ConnectionString="&lt;%&#36; ConnectionStrings:MyConnectionString %&gt;" ProviderName="&lt;%&#36; ConnectionStrings:MyConnectionString.ProviderName %&gt;" SelectCommand="SELECT * FROM myTable WHERE myTable.Name=@MyName"&gt; &lt;selectparameters&gt; &lt;asp:QueryStringParameter QueryStringField="MyName" Name="MyName" /&gt; &lt;/selectparameters&gt; </pre> <p><span>Thanks in advance for any help or suggestions you can provide<br> <br> <br> </span></p> 2013-03-12T13:19:12-04:002013-03-12T13:19:12.037-04:00