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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

XMLHTTP.ResponseText return unexecuted code?

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net
 

I have a simple asp with the following code.  When I access this page directly (via browser) everything works fine:  the xml object shows up fine.  When I call this page via VBA (excel), the ResponseText method of the 

XMLHTTP object returns the below code unexecuted.  Anybody knows what's going on?  thanks.





<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <% Response.Buffer = True Response.ContentType = "text/xml" Dim oDataXML As Object 'Custom Data XML passed in by caller. On Error Resume Next 'Load the XML passed into the request. oDataXML = Server.CreateObject("Microsoft.XMLDOM") oDataXML.Load(Request) Dim sResult As String sResult = "<?xml version=""1.0""?>" sResult = sResult & "<OrderProcessed>" sResult = sResult & "<Status>test</Status>" sResult = sResult & "<OrderID>111</OrderID>" sResult = sResult & "</OrderProcessed>" Response.Write(sResult) Response.End() %>





View Complete Post


More Related Resource Links

Return of the Rich Client: Code Access Security and Distribution Features in .NET Enhance Client-Sid

  

Rich clients employ many of the features and conveniences of the operating system they run on, and the list of these features has been growing since the dawn of the PC. But as apps have migrated to the Web, the trend towards increasing client-side functionality has ground to a virtual halt. There are several reasons for this; chief among them are security and deployment problems. But that's all about to change. With the .NET Framework, you can participate in building the distributable rich client of the future. In this article, the author enumerates the pertinent features of .NET that will allow you to build safe, easily deployable controls. The features discussed include managed code, code access security, versioning control, Windows Forms classes, and isolation.

Jason Clark

MSDN Magazine June 2002


Infopath form return XMl code during workflow task

  

1.     Review 7777.xml.

2.     Perform the specific activities required for this task.

Use the Edit this task button to mark the task as completed. (If you cannot update this task, you might not have access to it. Click here to request access.

How to return back back to code behind file after cascading dropdown calling

  
Hi, I have a cascading dropdown. After the dropdown is populated(it is in another file)  i would like to return back to the original form where the control is placed. is there anyway of doing it

ocienvcreate failed with return code -1

  
Hi. Its problem is generated in a Windows 2000 server and vb.net application. The users connect to aplication by terminal server. This is a permission problem... Thanks....DFPP

Install return code for product 'SQL Server Express 2008 R2' is Failure

  
I have winXP sp3. When i tried to install SQL Sever 2008 R2 through Web patform installer I got this error: DownloadManager Information: 0 : Loading product xml from 'https://go.microsoft.com/fwlink/?LinkId=193533' DownloadManager Information: 0 : Product manager downloading: https://go.microsoft.com/fwlink/?LinkId=193533 DownloadManager Information: 0 : Remote file has not changed, using local cached file:C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Web Platform Installer\-231145492.xml.temp DownloadManager Information: 0 : Loading product xml from 'https://www.microsoft.com/web/webpi/2.0/WebApplicationList.xml' DownloadManager Information: 0 : Product manager downloading: https://www.microsoft.com/web/webpi/2.0/WebApplicationList.xml DownloadManager Information: 0 : Remote file has not changed, using local cached file:C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Web Platform Installer\-1221301405.xml.temp DownloadManager Information: 0 : Filtering by majorOS: 5, minorOS: 1, majorSP: 3, minorSP: 0, productType: 1, architecture: x86 DownloadManager Information: 0 : Filtering by majorOS: 5, minorOS: 1, majorSP: 3, minorSP: 0, productType: 1, architecture: x86 DownloadManager Information: 0 : Adding product SQL Server Express 2008 R2 (SQLExpress) to cart DownloadManager Information: 0 : Product 'SQLE

Getting VP.NET code to respond to SQL Return values and Error Codes

  

I have SQL stored procedures that will return values depending on the outcome of its execution. I have the following code at the end of each of my Stored Procedures:

RETURN @siReturnValue

It would be great to be able to use this Return value after running the Stored Procedures from my VB.NET code. I have included an example of how I am running SQL Stored Procedures below:

    Public Function SearchKeyword(ByVal SearchString As String) As Data.DataTable
        Dim AerialConnection = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("aerialConnectionString").ConnectionString)
        Dim MediaArchive As New Data.DataTable
        Dim reader As SqlDataReader
        
        Try
            AerialConnection.Open()
            Dim SelectMediaArchiveCommand = New SqlCommand("EXEC spSearch @keywords", AerialConnection)
            SelectMediaArchiveCommand.Parameters.AddWithValue("keywords", SearchString)
            reader = SelectMediaArchiveCommand.ExecuteReader()
            MediaArchive.Load(reader)
        Catch e As Exception
        Finally
            AerialConnection.Close()
        End Try
        Return MediaArchive
    End Function

How can I code this to respond to different Return values, or even error cod

How to return a string value to code behind?

  
How to get a string value from a stored procedure to the code behind of ASP.net with C#

No return from unmanaged code, methods to catch exception?

  

I am developing a c# application that needs to calls functions from a c header file. I use

[System.Runtime.InteropServices.DllImport("xxx.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true,SetLastError=true)]
        public static extern Byte xxxx(IntPtr hResourceContext, ushort xxxx, ref structa aaa,ref Result_struct Result, Byte b);

to import the dll method. When I call this method in C#, the application simply exits without throwing an exception or error. I've used similar approach for other methods from the same dll which involves passing nested structs as parameter and they work fine. I would like to know how I can debug the code/ catch errors/exceptions from the unmanaged code.

I tried to include the SetLastError=true during DllImport but it does not help.

Thanks!


How do I assign the return value of a async code activity to the send activity in a workflow?

  

Hello,

Here's my scenario:

- I have a WF service with a Pick activity. 

- The pick branch contains a Sequence activity in the trigger section. 

- The sequence contains a Receive activity that receives some information from another WF service.  It then performs an async code activity called CopyFiles.  CopyFiles returns a boolean value based on if the copy was successful or not. 

- The Action section of the pick branch has a Send activity, which will send this result to the calling WF service.

- The calling WF will look at this boolean value and decide whether to move to the next step or not.

Question:

How can I pass this boolean value to the Send activity?

Below is my async CopyFiles activity:

public sealed class CopyFiles : AsyncCodeActivity<bool>
  {
    [RequiredArgument]
    public InArgument<Services.Application> Application { get; set; }
    [RequiredArgument]
    public InArgument<Services.Resource> ResourceFrom { get; <

How can i return a value from a simple WebForm.aspx to javascript code.

  

Hi Experts.

How can solve this problem; Suppose you write a simple JavaScript code in form tag like this:

<script  language="javascript">

                Var type="100";

                Var result = ';

Var iframe = '<iframe src="WebForm1.aspx?"t=' + type + '"></iframe>';

Document.write(iframe);           // call WebForm1.aspx in iframe tag

Document.write(result);            //write the result that return from WebForm1.aspx

</script>

I want return the value from WebForm1.aspx and save it in result variable. How can I do?How can i return a value from WebForm1.aspx and save it in result variable?

With Regards.Mojtaba


OCIEnvCreate failed with return code -1 but error message text was not available.

  

Hi,

We have a requirement to connect to oracle from ASP.NET and we installed ODAC(ODAC1110621) components  on the server but still we are getting the following error while opening the connection. Please find the details below:-

OCIEnvCreate failed with return code -1 but error message text was not available.

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.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.

Source Error:

Line 16:     {
Line 17:         OracleConnection con = new OracleConnection(ConfigurationManager.ConnectionStrings["HRDBA"].ConnectionString);
Line 18:         con.Open();
Line 19:         Label1.Text = con.State.ToString();
Line 20:         con.Close();


Source File: \\hs003fs01-02.homebase.com\wfmp\Webpage1.aspx.cs    Line: 18

Stack Trace:

Web Service Return Custom Error Code

  

I'm trying to write a Web Service that will return several different error codes so the client can handle each error code individually (e.g. err=600 call funcA, err=700 call funcB, etc..).

My code below always returns "500" for the _statusCode (or get_statusCode). Am I doing this wrong? How do I get a Web Service to return custom error codes to the client (javascript)? Any info appreciated. Thanks.

Try

If IsNothing(Membership.GetUser(UserName.ToString.Trim)) Then

objReturnValue = New UserInfo(UserName.ToString.Trim, False)

Else

objReturnValue = Nothing

Err.Raise(vbObjectError + 601, "UserExists", UserName)

End If

MDX code to return all ansestors

  

I have 2 dimensions, account and users. Some users have access only to some accounts.

I want to show all ansestors for this account.

here is what I have:

select
[Measures].[Period End Balance] on 0,
Exists([Account].[Account].[Account].MEMBERS, [User].[Login ID].[YULIA])
on 1
from viking

it returns only set of accounts that intersects with YULIA. I want to have parents of accounts. Something that will look like, notice in BOLD is what I don't know how to return.

select
[Measures].[Period End Balance] on 0,
 Ancestors([Account].[Account].[Account].??,??) on 1 from
(select Exists([Account].[Account].[Account].MEMBERS, [User].[Login ID].[YULIA])
on 1
from viking)


Y.K.

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

  
When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

Free Code Snippets - ASP.NET

  
You Can Find Useful ASP.NET Related Posts on the above link.

Free Code Snippets - C#

  
Free C# Code Snippets

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.
Categories: 
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