|
When you are getting this error ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
This is the patent NullReference error that comes to the browser.
There might happen when a script is loaded which might be calling a control before actually its been rendered in the document.
Thus it is always recommended to place a script either in an event.. if not any control event, use document.onload or place it below body tag.
In your case, I think the html output is not rendered properly. Make sure that Crystal Report dlls are properly installed in the web server and has access to them.
|
|
|
|
|
Hello,
I am Vikash Gohil.
I have a Query related to DLL files Usage in my Web Application.
I have a USB Device which reads Smart Cards and Stores Data from these cards in its memory.
Using a Windows Application which uses a DLL file, I can retrieve Data from that USB Device.
The DLL files have functions for Accessing/Controlling the USB Device.
Now I want the same functionality from a Web-Application.
ie, the WebApp will be run in Intranet environment with the App loaded on WebServer.
Now where do I need to put the Device DLL files that my Code uses for Controlling Device.
The Device is Connected to a USB port on Client PC.
So How can access the USB device on client PC, from Web browser running my web app.
Please Help me, I am a Newbee in Web Development.
Please Any help would be greatly appreciated.
Thanks In aDvance
|
|
|
|
|
|
Well Sorry for opening a new post,
Actually Abhishek, the earlier post was for devices Connected in LAN and this one is for Accessing a USB Device on Client PC,
might be the Subjects are same, sorry.
So any idea how can I access a USB device using it's DLL that is connected to Client PC from Browser.
The Client PC has all the necessary drivers and DLL files installed required to use the device.
Any Idea from anyone.
|
|
|
|
|
Hey... no big deal.. You can open as many post you want. The question should be different.
On this matter, I would like to say if you want to access your usb device from client pc without any driver installed.. it wont be done. Through website you can only transfer base64 data which has some limits.
You can make a browser plugin I guess... if you require this... provided the clients should download your plugin and install it to their machine.
I hope you got the problem clearly.
Cheers.
|
|
|
|
|
Hello, Abhishek.
Thanks for your reply.
Actually I would have everything Installed on Client PC ie, the Drivers for USB Device and Even my DLL file registered on Client PC.
Any way I was just thinking whether this Could be done through VBScript.
I have written a DLL file in which there are functions that Uses the Main DLL file.
I have registered the DLL on My PC. Also written a VBScript. But the Script is not working properly.
When Calling the function from a Windows App, gives me proper output.
But when run from VB script gives me improper results.
There are not errors, but results are not as expected.
Can you tell me why this Mismatch, when run from VB App runs perfectly OK, and on the same machine run using VBScript wrong results.
Also abhishek, you were talking about Plugins, could you give me more information on that, like how to use it, create it etc. Would be of great help, I had come to know of plugins but have no idea how to go about it.
Please any help would be great.
|
|
|
|
|
As VBscript doesnt work in browsers other than IE, it would be bad to do programming in VBscript.
And hey, if you are to install all the drivers in cleint pc why do you need to make use of browser. Why dont you use Windows program to do this job.
The web environment is only for those who are in remote areas and doesnt need to install any software.
You can use Windows application and use Remoting / WCF / Web service to communicate with the server as well.
|
|
|
|
|
Thanks Abhishek for your reply.
Well, Abhishek, you are right but it's a Clients requirement that the application should be Web-Based.
Also we are going for it bcoz in todays world everything is bcoming web-based, so it's necessary to be with the world other wise your competitors would leave u behind.
OK now back to the topic. See I have successfully written a VBscript to access a Card reader on clients PC using browser.
Now I have another query.
I have another USB device. To use this device, the manufacturer has provided a .OCX file.
So in windows app, I register my OCX and I can see a control in the ToolBox which I drop on a Form and use the USB device using this Control.
Now this Control works on Events and the USB device is a FingerPrint Reader.
When I place my Finger on the Reader it generates an Event which is Captured by my Windows App(bcoz of OCX Control on the Form) and I get the FingerPrint Data.
Now How Can I Achieve this in VBScript in my Web-Page.
Hope you understand my explaination.
Any Ideas.
|
|
|
|
|
Hello!
We run this code to get xml for an example from uri´s
<br />
try<br />
{<br />
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(requestUriString);<br />
<br />
webRequest.Timeout = timeOut;<br />
<br />
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();<br />
<br />
return new StreamReader(webResponse.GetResponseStream(), encoding);<br />
}<br />
catch(WebException e)<br />
{<br />
LogError(e);<br />
return null;<br />
}<br />
<br />
We keep getting alot of "The operation has timed-out"-exceptions thrown. Is there something we are missing when we are setting up the webRequest object? For instance, should we set ReadWriteTimeout?
/regards
W
|
|
|
|
|
|
Where you mentioned webRequest.Method
Other than that the code seems to be alright. If still errors out, open a web browser, paste the requestUriString to the address bar and see if the page response is within the Timeout limit...
Cheers
|
|
|
|
|
Thank you both for your responses! I will try your suggestions.
|
|
|
|
|
Hi
I have one dropdown contain status information.
Status are
1. Finished
2. Open
3. Progress
Also one date textbox.
I want to set the text box is editable and mandatory when i select the status as finished in the dropdown. Otherwise it should accept null values(not mandatory) and read only.
Can any one help me please. its urgent. It should be in C# or java script
Regards
K7
kesavan
|
|
|
|
|
I would have a requiredfieldvaliadtor on the textbox (and perhaps a regularexpressionvalidator too to ensure a date is entered) but set enabled to false. Then, when the user selects "FInished" from the dropdown, enable the validators.
|
|
|
|
|
You can simply implement it using AJAX Update Panel or JavaScript. You need to check the Selected value from dropdown list, and based on that you have enable/disable the Textbox. To avoid the un-necessary postback you have to use AJAX Updatepanel or Javscript
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello every one,i have a (mysql) database name "classified" in my computer.i want to add this in App_data folder.how to do this .
|
|
|
|
|
Please don't Cross post !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi All,
In my Application we are using flash files,in that if we click on the flash image it should redirect to another page in new window,so to do that we are doing like this:
string sFlashObject = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0\" height=\"195\" width=\"220\"> " + "<param name=\"movie\" value=\"http://ebutler.be/erez/fsi/fsi.swf?autobooklet=true&src=http://www.ebutler.be/erez&pages_dir=" + hfImageFilePath.Value + "&cfg=pages_presets/thumbnail.fsi&MouseModes_Mode2=0&
pages_demourl=http://localhost:3112/UI/FSIViewer.aspx?FolderID%3d" + hfFolderId.Value +
"&pages_demourltarget=_new\"> " +
"<param name=\"wmode\" value=\"transparent\"> " +
"<embed type=\"application/x-shockwave-flash\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"transparent\" src=\"http://ebutler.be/erez/fsi/fsi.swf?autobookletId=true&src=http://www.ebutler.be/erez&pages_dir=" + hfImageFilePath.Value + "&cfg=pages_presets/thumbnail.fsi&MouseModes_Mode2=0&
pages_demourl=http:///localhost:3112/UI/FSIViewer.aspx?FolderID%3d" + hfFolderId.Value +
"&pages_demourltarget=_new\" height=\"195\" width=\"220\"> " +
"</object>";
In the above script you can notice that i gave demourl as:
"http:///localhost:3112 /UI/FSIViewer.aspx?FolderID%3d"
Instead of this i need to show Servername where ever we open the application
Thanks In Advance
Yamuna
|
|
|
|
|
you can get the value of Current Server via Request.Url after some string manipulations. Request.Url.toString() will give you the URl of the current webpage request so via string manipulations you can get the name of the server.
|
|
|
|
|
First of all, you code is nota understandable at all.
yamunarani wrote: pages_demourl=http://localhost:3112/UI/FSIViewer.aspx?FolderID%3d" + hfFolderId.Value +
What about this one,
pages_demourl="/UI/FSIViewer.aspx?FolderID%3d" + hfFolderId.Value +;
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi Abhijit,
Thanks for your reply
We are using FSI viewer in Our application so we are using the Code which i posted in the message
if you want you can view the Message again.To bind the image dynamically we have to use that code.
If u want explanation about FSI viewer i will give you not understood.
Instead of http://localhost:3112/ this i need to use <servername> that too dynamically i have to get.
regards,
Yamuna
|
|
|
|
|
Is http://localhost:3112 is the same site from which you are...
If it is .. you can only use Relative path, rather than absolute.
|
|
|
|
|
Hi,
From a link I open up a popUp window where I want to display an xml, exactly the way for instance IE does when you open an xml document from file (expanded with parents and childs).
In my Page_Load method (in the popUp window) I retrieve the xml string via a web service and then I want it to be displayed. But how?
I tried the following code:
string xmlString = rq.GetErrorTextByID(id);
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlString);
doc.Save(Server.MapPath("message.xml"));
Response.Redirect("message.xml");
This works fine, but of course it physically creates the message.xml file on disk and I don't want that. I want the xml to be shown the same way as this code does, but I don't want the file to be created.
This might be a simple task, but I haven't worked with asp.net for that long Any ideas/suggestions?
modified on Wednesday, September 23, 2009 10:38 AM
|
|
|
|
|
You mean you need to write the content of message.xml to your browser??
Use this code :
Response.Clear();
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlString);
doc.Save(Response.OutputStream);
Response.Flush();
Response.Close();
I think this is what you need.
|
|
|
|