|
I have create activex control with following command on button click. ConsoleTest.exe is .net application.
Private Sub cmdLaunchApp_Click()
Shell (App.Path & "\ConsoleTest.exe")
End Sub
I have included activex control in html page with following tag.
<object classid="clsid:C429A323-8D83-4D4D-9BF9-EAB9F5CA705E#consoleTest.exe" codebase="http://kumar/actx/LaunchApp.ocx">
When this page is accessed on client. It display activex button but instead of calling exe file it display message like File not found.
Any body help us to resolve this problem
Kumar Prabhakar
|
|
|
|
|
Hi,
A little background on the application first. It is a .NET 2.0 win forms app which connects to a .NET 2.0 web service using WSE 3.0. When the user makes requests to login, a login method is called on the web reference. If this throws an error, an attempt is made to log the error to a database using another method on the web reference. If this fails enterprise exception handling takes over and the error is logged to a local file. Proxy details are set on the web reference before any methods are called (see code at end).
The Problem:
When the user tries to login an error is thrown stating proxy access denied, an attempt is then made to log this error causing another proxy access denied error. Finally this error is logged in a local text file.
The Bizare Part:
Even with the errors described above, the web service still records in the DB that the user logged in, and still records in the error log table "Proxy Access Denied" even though it had to go through the proxy to record the login and to log that error???
The Exact Error (logged in the database using the web service):
System.Net.WebException: The request failed with HTTP status 407: Proxy Access Denied. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at xx.Input.localhost.xxServicesWse.GetLoginData(String userName, String password) at xx.Input.Data.UserDataManager.login(String uName, String pWrd) at xx.Input.GUI.xxInput.loginInterface_login(Object sender, LoginArgs le)
Where do I go from here to solve this proxy problem. Note that testing the system on a network without a proxy works fine, even if the client contacts the web service accross the internet.
The Code: (returns the web reference used through the client)
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using xx.Input.localhost;<br />
using System.Net;<br />
<br />
namespace xx.Input.Web_Service<br />
{<br />
internal class ServiceProxyFactory<br />
{<br />
public static xxServicesWse GetxxService()<br />
{<br />
xxServicesWse xxServices = new xxServicesWse();<br />
<br />
System.Net.CookieContainer cookies = new System.Net.CookieContainer();<br />
xxServices.CookieContainer = cookies;<br />
<br />
WebProxy myProxy = new WebProxy();<br />
myProxy.BypassProxyOnLocal = true;<br />
string proxyAddress = System.Configuration.ConfigurationManager.AppSettings["proxyAddress"];<br />
if (proxyAddress != null && !proxyAddress.Equals(""))<br />
{<br />
myProxy.Address = new Uri(proxyAddress);<br />
string proxyUsername = System.Configuration.ConfigurationManager.AppSettings["proxyUserName"];<br />
string proxyPassword = System.Configuration.ConfigurationManager.AppSettings["proxyPassword"];<br />
string proxyDomain = System.Configuration.ConfigurationManager.AppSettings["proxyDomain"];<br />
myProxy.Credentials = new NetworkCredential(proxyUsername, proxyPassword, proxyDomain);<br />
}<br />
else<br />
{<br />
myProxy.Credentials = CredentialCache.DefaultCredentials;<br />
}<br />
xxServices.Proxy = myProxy;<br />
<br />
return xxServices;<br />
}<br />
}<br />
}
|
|
|
|
|
The following code seems to work:
<br />
IWebProxy iwp20 = WebRequest.DefaultWebProxy;<br />
string requestURL = Properties.Settings.Default.xxInput_localhost_xxServices;<br />
string proxyAddress = iwp20.GetProxy(new Uri(requestURL)).ToString();<br />
if (!proxyAddress.Equals(requestURL))<br />
{<br />
WebProxy myProxy = new WebProxy();<br />
myProxy.Address = new Uri(proxyAddress);<br />
myProxy.Credentials = CredentialCache.DefaultCredentials;<br />
xxServices.Proxy = myProxy;<br />
} <br />
Now I just have to figure out how to get the auto upgrade feature of click once deployment working through the proxy server.
|
|
|
|
|
Heres a question...
I have a series of web services and applications being served from IIS 5. Now I would like to create stats on the amount of hits etc to these endpoints. Something like AWStats.
A relatively simple task, however:
- I do not want to install any other backends, therefore I cant use AWStats as it requires perl
- I would like to be able to serve the stats via a webpage, therefore I cant easily use Microsofts Log Parser
In essence I want an AWStats clone written in ASP .NET or ASP
Does anybody have any suggestions on possible solutions?
|
|
|
|
|
i want to fill a drop down box using data retrieved from access database.......
i alread know how to connect and retrieve data from the database but i am a lil unsure as to how i can populate the drop down list with the values retrieved
kenny
|
|
|
|
|
I think you have to output the OPTION tags "by hand" in classic ASP.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
dynamically like this:
<SELECT id=cmbHelp>
<OPTION value="0">-Select - </OPTION>
<%do while not MyRs.EOF %>
<OPTION value="<%=MyRs("id")%>"><%=MyRs("name")%> </OPTION>
<%MyRs.MoveNext
loop%>
</SELECT>
or for none database driven content
<SELECT id=cmbHelp>
<OPTION value="0">-Select - </OPTION>
<OPTION value="1"> item1</OPTION>
<OPTION value="2">item2 </OPTION>
</SELECT>
none
|
|
|
|
|
Got this question - I am working in a company that has been using VS2003 and the older .NET framework for all its projects; I want to experiment with web-development, ASP 2.0 but I am wary of any compatibility problems. If I install the 2.0 SDK and continue to use VS2003 and projects developed in previous .NET, should everything be fine?
Thanks in advance..
|
|
|
|
|
If you are thinking about developing .NET 2.0 applications in VS2003 then you are wrong.
But yes you can have VS2003 and VS2005 installed on the same computer without any problems (I have this setup here at work and it works)
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
You cannot use VS2003 to build a .Net 2.0 application.
You can use the free Visual Studio Express[^] to build your application though.
Edbert
Sydney, Australia
|
|
|
|
|
IN ASP
If we use ENCTYPE attribute in form tag for example
...(because its neccessary to use for file uploading)
then we cannot get form;s object values using REQUEST object.
My question is this how can we get the value of form object on next page if we use ENCTYPE attribute in form TAG
|
|
|
|
|
Hiya all.
I stumpled on a problem one of my coworkers were having today, in that he'd like to fire an onMouseOver event on each option in a select-object.
What ideally would should happen was that an image would be changed when the mouse hovers over the options in a select. This can be done with FireFox, but not with IE, by using onMouseOver on each option.
something along this line:
<select>
<option onMouseOver="doStuff(1)">Option 1</option>
<option onMouseOver="doStuff(2)">Option 2</option>
</select>
Now this works in FireFox, but unfortunally in IE, which is what the client is going to use.
Does anybody know of a work-around or possible alternative implementation to this problem?
With regards
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Hi,
You can perform the check in the select onChange event.
Something like this:
<code><script language="javascript">
function selectExp()
{
alert(document.getElementById('ddlTest').options[document.getElementById('ddlTest').selectedIndex].value);
}
</script>
<SELECT id="ddlTest" ONCHANGE="selectExp();">
<OPTION value=1 selected>first</OPTION>
<OPTION value=2>second</OPTION>
<OPTION value=3>third</OPTION>
<OPTION value=4>fourth</OPTION>
<OPTION value=5>fifth</OPTION>
<OPTION value=6>sixth</OPTION>
<OPTION value=7>seventh</OPTION>
<OPTION value=8>eighth</OPTION>
<OPTION value=9>ninth</OPTION>
<OPTION value=10>tenth</OPTION>
</SELECT></code>
This wey you get the selected index or its value , accordingly you can put the code for different options.
I hope this works for you.
Thanks
Sushant Duggal.
|
|
|
|
|
Thanks for the reply.
The problem is that onChange dosen't fire until after the selection has been changed in which case the page changes, whereas the onMouseOver in Firefox would trigger as you use your mouse to "scroll" down the selection-choices, and you'd be able to see a preview before making the selection.
I am "fearing"/thinking that we do need to go with an "onChange" to have compatibility with Internet Explorer, but seeing as this was a client request (*sigh*) I thought it was worth to see if there was a workaround for IE, to mimic the behaviour we see in Firefox.
But thanks for your reply.
With regards.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Newb brainer question;
working in c# 2005, doing an asp.net webpage. This seems to be more of an HTML or formatting issue but I thought this was the best place to ask. After writing a basic page with standard html code, I noticed that when I view the webpage in browser, and I resize the screen, the text will stay within the baorder of that window. It basicly won't stay put. I checked all the settings I could think of minus the use of Text boxes.
It seems like a rather basic answer because I can go to any other webpage and the text and page flow stays. any thoughts?
Apps programmer exploring the fun world of webbing.
/////////////////
Thus spake the master programmer:
``A well-written program is its own heaven; a poorly-written program is its own hell.''
|
|
|
|
|
So the text stays withing the border of the window? Isn't is supposed to do that? Where do you want the text to go?
---
b { font-weight: normal; }
|
|
|
|
|
just thought of it; it behaves like a "wordwrap" when you resize the screen. when I type in here, the words move till end of box, with wordwarp, end of size of window. a bit more clearer now? Sorry, just having trouble discribing this, though "wordwarp" is closest I can come up with.
/////////////////
Thus spake the master programmer:
``A well-written program is its own heaven; a poorly-written program is its own hell.''
|
|
|
|
|
If you don't want the text to adjust itself to the width of the window, you have to put an absolute width on the element that contains the text.
---
b { font-weight: normal; }
|
|
|
|
|
thanks man, will keep formatting then
/////////////////
Thus spake the master programmer:
``A well-written program is its own heaven; a poorly-written program is its own hell.''
|
|
|
|
|
I have a repeater control to display thumbnail pictures. The itemtemplate is made of web image control. When user clicks on the thumbnail picture, I want it to display a larger image in a web image control and display the image description in a label( the image description is saved in database).
My current code is :
I have a getPhoto function which will get the thumbnail pictures through IhttpHandler and bound to the repeater control.
Then I have a repPhotoG_ItemDataBound function, here I add the javascript to the image html control and call a javascript to pass the thumbnail imagename as parameter and show the large image.
Now, I can get the thubnail picture and display the large images, but I just don’t know how to get and display the image description. Please help!!
private void repPhotoG_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
//finding repeater item Image
System.Web.UI.HtmlControls.HtmlImage img=(System.Web.UI.HtmlControls.HtmlImage)e.Item.FindControl("iPhoto");
//create a relative path for image and add onclick function
img.Src=img.Src.Replace('\\', '/');
string Description="";
string Image;
Image=IMGpath(img.Src);
img.Attributes["onclick"]="showImg('"+Image+"')";
}
function showImg(imgName)
{
imgOn = ("" + imgName);
document.imgLarge.filters[0].Apply();
document.imgLarge.src = imgOn;
hdr.innerHTML=imgName;
document.imgLarge.filters[0].Play();
-- modified at 17:29 Monday 5th June, 2006
|
|
|
|
|
Hello everyone,
Is there a way to get the size of the browser window with javascript?
Thanks,
Chad
|
|
|
|
|
Here are a couple of functions to get the client area:
function clientHeight() <br />
{<br />
var myHeight = 0;<br />
if( typeof( window.innerWidth ) == 'number' ) <br />
{<br />
myHeight = window.innerHeight;<br />
} <br />
else if( document.documentElement &&<br />
( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) <br />
{<br />
myHeight = document.documentElement.clientHeight;<br />
} <br />
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) <br />
{<br />
myHeight = document.body.clientHeight;<br />
}<br />
return myHeight;<br />
}<br />
function clientWidth() <br />
{<br />
var myWidth = 0;<br />
if( typeof( window.innerWidth ) == 'number' ) <br />
{<br />
myWidth = window.innerWidth;<br />
} <br />
else if( document.documentElement &&<br />
( document.documentElement.clientWidth || document.documentElement.clientWidth ) ) <br />
{<br />
myWidth = document.documentElement.clientWidth;<br />
} <br />
else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) <br />
{<br />
myWidth = document.body.clientWidth;<br />
}<br />
return myWidth;<br />
}<br />
They seem to work in IE and FF. Can't remember where I got these from, somewhere on google is my bet...
|
|
|
|
|
Thanks, I will try these.
Chad
|
|
|
|
|
Try this:
windowWidth = window.screen.width;
|
|
|
|
|
hey this is a huge problem.There is a compilation error in the line DriverManager.getConnection();when i compile the problem saying incompatible types class not found.how should i make the connection between java and sql at my home??????????
-- modified at 4:07 Monday 5th June, 2006
|
|
|
|