|
|DataDirectory|\aspnetdb.mdf;
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
i needed to get the free disk space on a shared remote drive.
my shared-name goes something like this -- \\RemoteServer\ADrive$
ConnectionOptions oConn = new ConnectionOptions();
oConn.Username = "xUser";
oConn.Password = "xxxx";
string sSrvName = @" \\RemoteServer\ADrive$";
ManagementScope oMS = new ManagementScope(sSrvName, oConn);
I get the error - "Invalid Parameter".
If i remove the $ sign from the end of the server name and make it something like \\RemoteServer\ADrive
it goes past the above statement and fails at
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMS, oQuery) ;
ManagementObjectCollection oReturnCollection = oSearcher.Get() ;
with the error - "RPC server is unavailable"
but when trying to map the above mentioned share drive - \\RemoteServer\ADrive$, via Windows Explorer it works.
any kind of help is appreciated.
thanks to all
|
|
|
|
|
in services.msc (via start-> run) you can see all your service. Make shure your 'Remote Procedure Call (RPC)' is started.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I updated my profile information and saved profile by invoking Profile.Save.
Immediately after calling Profile.Save, when control excutes page_load in master page,
I observe that this.Profile gives me old/original data.
I updated my profile a second time, and now in the page_load of master page, i get
the 1st updated profile information.
Is there any refreshing that I should perform to have this.Profile provide
latest information immediately after updating the profile?
|
|
|
|
|
Due to the sequence of event you got such result.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
hi Kanu,
how can I correct the sequence of events? My master page will get loaded all the time, isn't?
NetQuestions
|
|
|
|
|
But you are saving profile after that and the new value of profile will not available to you until postback. Isn't it?
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
you are correct Kanu ... i put break point and observed that update was the last operation performed.
so now after update i execute response.redirect(profile.aspx).
thanks,
netquestions
|
|
|
|
|
I'm having a problem with my asp.net page(Internet Explorer Progress Bar Showing Incorrect Status or I'm doing something wrong?) and found a similar issue in http://support.microsoft.com/kb/293373. I don't know if I'm doing wrong in my page but I hope not. What my page does is, During page load I will bind my grid to a table of job and I have a column for status. I will check all the record status if there is a job with status "Executing" so its either true or false. I will save that to a hidden field named IsExecuting. In the Javascript I have this 3 functions (1)startcoundown (2)countdown(3)AJAX prm_endRequest.
startcoundown will be called during window.load and prm_endRequest
countdown will be called if If IsExecuting=True
prm_endRequest will be called after AJAX endRequest
In AJAX prm_endRequest call function startcoundown
In startcoundown If IsExecuting=True then do countdown and Trigger btnRefresh.Click after 5 seconds( btnRefresh.Click will bind my grid again/refresh my grid)
Repeat until all status=Completed.
It's all working fine its just that IE progres bar still indicating page is loading eventhough page is already loaded. Am I missing something? I already tried many things and nothings work to fix this issue. It's working in Firefox. Thanks
modified on Tuesday, May 26, 2009 7:49 PM
|
|
|
|
|
I have a problem in asp.net
i wanted to call my windows app exe from web app with paramters.
its working with process.start(). but i can t see UI of windows app on clients machine.
so i wrote javascripr function and its working fine , i can use windows UI on clients side. but now i dont know how to send arguments with that and how to fetch arguments in windows app.
Please let me know asap.
here is code.
<
SCRIPT Language="JScript">
function
runcmd() {
File="C:\\TestParamFromAsp.exe";
WSH=new ActiveXObject("WScript.Shell");
WSH.run(File);
//document.getElementById('<%=btnSendMail.ClientID%>').click();
//sInfo=new System.Diagnostics.ProcessStartInfo("C:\\TestParamFromAsp.exe");
//p=new System.Diagnostics.Process;
//sInfo.Arguments="12345";
//p.StartInfo=sInfo;
//p.Start();
}
</
SCRIPT>
Codebehind is working independently.
Protected
Sub btnSendMail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSendMail.Click
'Dim sInfo As New Diagnostics.ProcessStartInfo("C:\\CGS_NEWDESIGN_UPDATED\\ContractAutomation\\bin\\ContractAutomation.exe") '("C:\\TestParamFromAsp.exe")
Dim sInfo As New Diagnostics.ProcessStartInfo("C:\\Documents and Settings\\hkacholi\\My Documents\\Visual Studio 2005\\Projects\\TestParamFromAsp\\TestParamFromAsp\\bin\\Debug\\TestParamFromAsp.exe")
'Dim sInfo As New Diagnostics.ProcessStartInfo("//vsapps/cgs/ContractAutomation.exe") 'C:\\Documents and Settings\\hkacholi\\My Documents\\Visual Studio 2005\\Projects\\TestParamFromAsp\\TestParamFromAsp\\bin\\Debug\\TestParamFromAsp.exe")
'Dim sInfo As New Diagnostics.ProcessStartInfo("C:\\TestParamFromAsp.exe")
' startInfo.WindowStyle = Diagnostics.ProcessWindowStyle.Maximized
Dim p As New Diagnostics.Process
'Diagnostics.Process.Start(sInfo)
sInfo.Arguments =
"12345"
'Diagnostics.Process.Start(sInfo)
sInfo.RedirectStandardOutput =
True
sInfo.RedirectStandardInput =
True
sInfo.RedirectStandardError =
True
sInfo.CreateNoWindow =
True
sInfo.UseShellExecute =
False
p.StartInfo = sInfo
p.Start()
End Sub
hemaxi
|
|
|
|
|
You cant invoke client exe from your web site.
Sorry
Web sites dont have access to C:\ which you are using.
If you call this using Diagonistic.Process.Start, it will run in the server, not in the client.
|
|
|
|
|
my exe is not on c:\. its on server.
besides that its not the question of running. its running from the server but my question is how to pass parameter ?
|
|
|
|
|
Then create an object of System.Diagonistic.Process (say p) and p.StartInfo= new ProcessStartInfo("filename","args")
Now call start method.
|
|
|
|
|
I have a textbox that can represent different things and need to use diffferent validator controls based on Radio buttons. As a newbie I'm not familiar with how to accomplish this. Can someone provide some much appreciated guidance.
|
|
|
|
|
You need to change the regular expression based on the selection of radio button.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
That is correct, I need to change ValidatorControl on a Radio click
but like i said, i'm not familiar with how to do this.
An example code snippet would be nice.
|
|
|
|
|
Hi,
I have a very strange experience with the autocomplete extender. A User types a name of an object in a textbox. This values (after 2 characters) calls the webservice. So far so good.
If I type 'te' as string the Autocomplete extender returns 'test1', which is correct.
If I type '02' as string the Autocomplete extender returns '36446529'. If I run the Stored Procedure, which is called by the webservice which is used by the autocomplete extender, the Stored Procedure returns '0213020501', which is the correct objectname.
What changes '0213020501' in '36446529' ? No other code between webservice, autocomplete extender and textbox!
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi,
I am using a fileupload control in my .net project.I am storing the file name in to the database.
Now my question is that it is possible to retrive the filename will full path back in to the fileupload while updating the record.
For example i am storing a file name "xyz.jpg" in to the database.And the file is stored in some folder say ../images/xyz.jpg.
so is it possible to get back the full path with the file name back in to the fileupload control.
If it is possible please let me know.
Regards,
Pranav
Pranav Dave
|
|
|
|
|
why dont you use
Request.PhysicalPath
to get the current physical path and add the relative to it.
|
|
|
|
|
If im understanding you right, then no, I dont think you can do that as it would cause quite a security risk. Because what if you set the directory to some personel documents...
|
|
|
|
|
If your are using ASP.NET then you may use ~ (root) operator to resolve path with server controls.
Save ~/images/xyz.jpg in database.
However, you said "Is it possible to get back full path?". Yes you can:
Use,
Server.MapPath or Request.MapPath or MapPath method.
eg.
String fullpath=Request.MapPath("~/images/xyz.jpg");
or
String fullpath=Request.MapPath("../images/xyz.jpg");
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
I am working on a site that will allow the user to view a video which is synchronized with other media on the website. In other words, as the video plays, at certain points the page needs to be updated to display different content. So basically, the video needs to fire events at certain times in order for the page to know it's time to change content. Would Silverlight be the way to go with this? I posted here instead of the Silverlight section since I'm not very familiar with video manipulation and didn't know if there would be a better solution.
Much thanks!
|
|
|
|
|
Silverlight will do this. ASP.NET will not.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello,
I'm making a bulletin board with multi-file upload.
when I click Edit button, I would like to show files that I uploaded on ListBox.
so, I used both of "System.Web.UI.HtmlControls.HtmlInputFile" and "System.Web.UI.WebControls.FileUpload".
this is my code.
static public ArrayList hif = new ArrayList();
for(System.Web.UI.WebControls.FileUpload HIF in hif)
{ ... }
hif.Add(ListBox1.SelectedValue);
It gives error cannot convert System.Web.UI.WebControls.FileUpload to System.
I know ListBox1.SetectedValue is string data type.
How can I convert System.Web.UI.WebControls.FileUpload to System.string?
p.s.
I tried to use like this . (FileUpload)ListBox1.SelectedValue.
but that can't be converted.
Thanks.
|
|
|
|
|
You can call ToString(), but I doubt that's what you want. I assume you want to select the Filename property on the object.
I thikn you need a good book on OO before you do any more work.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|