Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Monday, March 26, 2012

Vista w/ vs2005 & Ajax

Is there anyway to allow ajax tag prefixes as asp without having designer errors when declared in web.config or page? I'm running as administrator and have sp1 (kb926601) and the vista patch (kb932232) installed

ex:
no errors in designer:
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="ajax" %>

causes errors in designer:
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>


Hi,

As far as I know, the ajax extension has a tagprefix "asp" by default, so it's not necessary to specify it.

And I also tried both, they all work fine.

Saturday, March 24, 2012

want to disable button for the webmethod running time

Hi,

Iam using time-consuming webmethod and on the client page atlas:timecontrol for automatic refresh part of page. I want to disable button(whitch start the 5hours webmethod). The one way to disabling is using method in form tag:

onsubmit="DisableButtons()"
But this event is calling every (for example) 5 seconds of automatic refreshing of atlas:timecontrol.
Exist the way to disable button after click the start button and after ending this method button enable back? 
Thanks a lot. 

Hello,

The way to accomplish this is something like the following:

function onServiceComplete(result) {
var button = $get('myButtonElementId');
if (button) {
button.style.disabled = ''; // enable
}

// do stuff with result here...
}

function callService(stuff) {
var button = $get('myButtonElementId');
if (button) {
button.style.disabled = 'disabled'; // disable
}

var serviceParam = stuff;
MyServiceName.DoStuff(serviceParam, onServiceComplete, function(serviceErr) {
// be sure to re-enable when error occurs...
button.style.disabled = '';
var errorDiv = $get('myErrorDiv');
errorDiv.innerText = serviceErr.get_message();
});
}

I hope this helps.

WCF Hosted in IIS over SSL

I've got a Windows Communication Foundation service that I'm hosting in IIS 6 and running over SSL using a certificate that I created using selfssl. I'm able to view the .svc with no errors in IE but when I tried to add a service reference to it in Visual Studio I got the following error:

Error: Cannot obtain Metadata from https://localhost:777/AuthService.svc

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.

WS-Metadata Exchange Error

URI: https://localhost:777/AuthService.svc

Metadata contains a reference that cannot be resolved: 'https://localhost:777/AuthService.svc'.

Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:777'.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

The remote certificate is invalid according to the validation procedure.

HTTP GET Error

URI: https://localhost:777/AuthService.svc

There was an error downloading 'https://localhost:777/AuthService.svc'.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

The remote certificate is invalid according to the validation procedure.

I checked the article it referenced in the error message and I can't find anything I've got setup wrong. Thanks in advance for any help. Here's my config file:

<

system.serviceModel>

<

bindings>

<

wsHttpBinding>

<

bindingname="sslTest">

<

securitymode="Transport">

<

transportclientCredentialType="None"/>

</

security>

</

binding>

</

wsHttpBinding>

</

bindings>

<

services>

<

servicename="HEI.Auth.BL.AuthUtil"behaviorConfiguration="myServiceBehavior">

<

endpointaddress=""binding="wsHttpBinding"bindingConfiguration="sslTest"contract="HEI.Auth.BL.Interfaces.IAuthenticate" />

<

endpointcontract="IMetadataExchange"binding="mexHttpsBinding"address="mex"/>

<

host>

<

baseAddresses>

<

addbaseAddress="https://localhost:777/AuthService"/>

</

baseAddresses>

</

host>

</

service>

</

services>

<

behaviors>

<

serviceBehaviors>

<

behaviorname="myServiceBehavior">

<

serviceMetadatahttpsGetEnabled="true"httpsGetUrl=""/>

</

behavior>

</

serviceBehaviors>

</

behaviors>

</

system.serviceModel>Sorry if I missed something, but this doesn't appear to be related to ASP.NET AJAX. You might get better help on a WCF forum.
The reason I posted it here is because I did a search for wcf and this was about the only forum that had any posts for wcf. Anyway, it was a problem with my certificate. I created a certificate with selfssl but I didn't name it "localhost" so the certificate didn't match the site address. Once I made a new certificate with cn=localhost I was able to add the service reference in visual studio.