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


Post New Web Links

How do I preserve __viewstate between cross domain posts or how do I get a __viewstate of a Remote S

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

Here is what I want to do:
I have a local site in which I want to display data from a remote site
Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost

Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.

The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself

How can I accomplish it?




View Complete Post


More Related Resource Links

ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript

  
The article ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript was added by Aamir Hasan on Thursday, August 19, 2010.

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn't allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull content

$.ajax post from asp.net page and __viewstate causing call to fail

  

Hello

Now I know that I won't be sending viewstate and eventvalidation in my ajax calls and that I will only want to send the actual form fields for efficiency purposes but I will need to know the answer to this question, to inform the more junior members of the team and my manager, so if anyone has any answers they are most welcome.

I have a simple form as follows

<form id="form1" runat="server"> 
<p>Field1: <

Cross domain search

  
We have a need to search site A (WSS) hosted on an environment (domain A) from an SSP hosted on a totally separate environment and domain (MOSS 2007). Let us call the SSP domain as domain B. What kind of trust the domain B's search account need to have with respect to domain A? What kind of authentication site A needs to have? Is it possible to crawl site A with NTLM authentication or it has to be anonymous? Thanks

WF Service and Silverlight Cross domain exception

  
Hi I have created a workflow service (xamlx) and hosted it on IIS. The web.config file of the service is: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <services> <service name="VacationRequestService"> <endpoint contract="IVacationEntry" binding="wsHttpBinding"/> </service> </services> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests

cross domain error in self hosted wcf service

  

 Hi

 

I get this error when trying to access a self hosted wcf service...

An error occurred while trying to make a request to URI 'http://localhost:2363/Service1.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.


Can someone please explain what I need to do to get this to work, I do not have any cross domain policy file. And don't know how that is supposed to look like.


A __ViewState field is being posted to my form and causing validation to fail. How do I ignore this?

  

I'm implementing a payment gateway, and it basically works like this:

User will do their shopping at my site, and view Cart.aspx. Cart.aspx will post the form to the payment gateway.

The payment gateway will process the payment, and then do a post back to my server at Response.ashx. It posts the details of the credit card transaction, but it will also re-post whatever I gave it. So it is giving me back a __ViewState field. (ViewState, EventValidation, RequestValidation are all disabled on both Cart.aspx, and Order.aspx, which is the page being redirected to.)

Response.ashx has the following code:

public class Response: IHttpHandler, IRequiresSessionState
{
   
public void ProcessRequest(HttpContext context)
   
{
       
new ResponsePresenter
(this);
   
}

   
public void

Remote administration within domain with alternative credentials

  

Hi all

Pls. forgive me if I picked the wrong forum

Ref: Visual Studio 2008 (C#), windows application project for a Win2003 domain environement.

Im having  a problem with System.ServiceProcess.ServiceController class if I want to run this under an alternative user credentials, It seems not be a simple way to do this.

If possible I would like to use the ServiceController class because it provides really nice implementations for handling all needed operations when it comes to operate Services, especially dependencies.

I've tested it running as a member of Domain admins and it works great, much esier than using WMI (ManagementObject...)

On the other hand, WMI provides a way to "run as" by adding a ConnectionOptions to the Scope object

I also tried Impersonation using a class created on the article http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158 

The impersonation process works, but now the ServiceController failes due to privileges!?! and I was impersonating the domain Administrator himself.  Exception is: System.InvalidOperationException,  Text: Cannot open Service Control Manager on computer 'TESTPC'. This operation might require other privileges.

So my quest

Access to remote.domain

  

Hi to all, I have a question regarding my network and access to remote.domain.com from remote location. I created Sharepoint and it is working well from whitin organization. I created A record =remote  on ISP DNS, my network is like this

ISP----router1------------W2k8R2 RRAS------------------inner network with DC .....

I opened on router 1 987 port and forwardet to w2k8R2 and there again I forwarded to DC. Is that ok or I can just forward it directly to DC.

Sharepoint is still not accessible from outside.


Cross domain issues on iframes with WSS 3.0

  

Hai All,

             I have 3 SiteCollections say

1. Default  - http://Mysite.com

2.  SubSite1 - http://Site1.MySite.com

3.  Site1 - http://MySite2.com

4. Site2 - http://MySite3.com

There is a page says http://Mysite.com/Main.aspx add 3 Iframes into it during the pageload by javascript code.

var bFrameCount =0;

function setIframe(args)
    {
        var iframecreater = "<iframe id=\"iframeLogout"+bFrameCount+"\" height=\"50px\" width=\"50px\" frameborder=\"0\" src=\""+args+"\" scrolling=\"no\" ></iframe>";
        if(document.getElementById('divContainer')!=null)
        {
            document.getElementById('divContainer').innerHTML = document.getElementById('divContainer').innerHTML + iframecreater;
     &nb

Cross domain authentication

  

How can I make my customer, situated in a different domain, access my database using SSMS using Windows authentication?

Can you please direct me to step-by-step guidance.

All the best

Simon


Cross-Domain policy error using soap in Silverlight with a Webservice

  

Getting the following error...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso

Cross domain javascript callback is not supported in authenticated services.

  

i am getting following errors to run WCF 4.0 web services.

Cross domain javascript callback is not supported in authenticated services.

after commenting following lines in web.config file now wcf project is working fine. what is the wrong in my side.

<!--
<standardEndpoints>

    <webHttpEndpoint>
        <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="false" maxReceivedMessageSize="2147483647" crossDomainScriptAccessEnabled="true" />
    </webHttpEndpoint>
</standardEndpoints>
-->

How does cross domain users (in the same forest) get authenticated/ authorized in MOSS 2007 ?

  

How does cross domain users (in the same forest) get authenticated/ authorized in MOSS 2007 site (Windows Authentication).
Is it possible? If yes, then how? and if no then appreciate any workaround.

Regards.

 


Cross domain error in WCF

  

I have developed the small application demo using PollingDuplex. It was working fine.

I am getting Cross domain error. Please help me

 

Error : An error occurred while trying to make a request to URI 'http://localhost:xxxxx/DuplexSvc.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sen


I have uploaded code here...

http://cid-aae2199ee00a44c6.office.live.com/self.aspx/.Public/Duplex2.zip

 


Many Thanks Deepak

Importing huge tables from cross domain SQL servers

  

Hello,

I am new in SQL server world and I have a problem in handling the import of lot of records (~12*10^6 records) between two SQL Servers that are in different domains.

I started using DTS through the import facility and I don't see lot of traffic on the LAN, so this seems a good approach, but it takes more than 4 hours to copy the entire temporary table from source SQL to destination SQL.

So I was thinking to linked server, and using sp_addlinkedserver I can hook the remote server. Now I would like to know if performing the select with the OPENQUERY is a better approach or if I could use a better solution.

My problem is that I should find a way for automating this activity every night, so every solution should be schedulable through SQL jobs, is this correct?

Thanks for any suggestion and help

Moreno

 

 


Sharepoint Cross domain authentication

  

Hi,

I manage a domain (MyDomain) that is trusted by a domain (TheirDomain) in which there is a Sharepoint site I wish to connect to. The trust in place is one way non transitive (i.e. the TheirDomain trusts MyDomain).

My SPS knowledge is quite limited but from looking around online it seems, in order for the admin in that domain to add individual users from this domain to their SPS site that various changes are required to their SPS instance (involving stsadm commands amoung other things).

In an effort to find the easiest solution, instead of adding each user in MyDomain individually to the SPS server could we have an admin from TheirDomain add a domain security group from MyDomain into a security group in TheirDomain and then allow that security group basic read only access to the SPS server.

Any advice would be appreciated?

Thanks

Paul


AJAX CROSS DOMAIN

  

Hi !

If I want to retrieve part of an html from pages that is locacted in other domain using AJAX, how do i do it securely ??

Thanks


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