|
Not good for me, if the filename permissions on the server are minimum I can't open the file.
|
|
|
|
|
But not even the code running at the server side is able to open the file?
If that's the case, it will be impossible to solve.
I think what you want is something like this:
Direct connections to a folder or http folder: They are not able to access the files.
Connections to a page - Such page will be able to see only files located at "some directory". If "some directory" is protected from reading, you may need some type of impersonation.
But, then, the flow will be:
Clients (without any access) will access your page at the server.
Such page will have some type of impersonation, can verify if the file only contains the names (no .., no drive letter and so on) and, even then, it only has access to one directory. It reads the file (if valid) and then returns its contents.
If you need, I can detail better about impersonation, but I don't think that you will really need that.
|
|
|
|
|
First you need to give the user some way of selecting which file they need to open. This can be done through may ways, may be you list all the files on you page?
Once a user selects (knows) which file they want, they don't permission on the server side. But asp.net will definitely need a permission to read/access the files from that folder. If asp.net does not have permission then it will fail.
|
|
|
|
|
In order to open the document on the client side, the encoding must be set to an appropriate type for the relevant document. The thing you need to set is known as the MIME type, for instance - if you want to open up an Excel document, the content type should be set to application/vnd.ms-excel. I hope that this helps.
|
|
|
|
|
Hi,
is there anyway to create dynamic variables at the runtime based on a
string input from another function
string datatypestring="int";
using this datatypestring i need to create a integer variable at run
time.is there any methods available in reflection to create dynamic
variables(like int, double etc)
|
|
|
|
|
|
Yes, there is, but you must first get the real type (or must do conversions by your own).
Type type = Type.GetType("System.Int32");
object value = Activator.CreateInstance(type);
But note that I am using "System.Int32" and not "int". For double, you must use "System.Double".
After creating it, it returns as object, but casting it will work.
|
|
|
|
|
I am making outlook2010 add-ins by using visual studio 2010.
I want menu to which image top and Caption is below.
So i was coding as below.
But when i run outlook , i can see menu which image is left and Caption is right.
1. How can i Fix This?
2. And I have other question
I want to show submenu when i click right button.
How can i add? now i am reference msdn but there is not answer.
button_1.Style = Office.MsoButtonStyle.msoButtonIconAndCaptionBelow;
button_1.Caption = "Button 1";
button_1.Tag = "Button1";
button_1.Picture = getImage();
sealed public class ConvertImage : System.Windows.Forms.AxHost
{
private ConvertImage()
: base(null)
{
}
public static stdole.IPictureDisp Convert
(System.Drawing.Image image)
{
return (stdole.IPictureDisp)System.
Windows.Forms.AxHost
.GetIPictureDispFromPicture(image);
}
}//sealed public class ConvertImage : System.Windows.Forms.AxHost
private stdole.IPictureDisp getImage()
{
stdole.IPictureDisp tempImage = null;
try
{
System.Drawing.Icon newIcon = new System.Drawing.Icon(@"Stars1.ico");
ImageList newImageList = new ImageList();
newImageList.Images.Add(newIcon);
tempImage = ConvertImage.Convert(newImageList.Images[0]);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
return tempImage;
}//private stdole.IPictureDisp getImage()
hi
My english is a little.
anyway, nice to meet you~~
|
|
|
|
|
I do complie and create dll file in debug folder.
This dll file is outlook's add-ins funtion.
So i want to test other pc.
I move this dll file to other pc and input regsvr32 ~~~.dll.
But Error is displayed which DLLRegisterServer entry point was not found.
How can i Test this dll file?
|
|
|
|
|
buffering83 wrote: I do complie and create dll file in debug folder.
You may want to distribute 'release' version as opposed to debug version
buffering83 wrote: This dll file is outlook's add-ins funtion.
But you heading says asp.net dll. So which one is it?
buffering83 wrote: So i want to test other pc.
I move this dll file to other pc and input regsvr32 ~~~.dll.
If this is .net dll you don't need to register it, on the other hand if it OLE control or ActiveX then make sure regsvr32 directory (System32 dir) is in your path. Try the full path if needed.
buffering83 wrote: But Error is displayed which DLLRegisterServer entry point was not found.
This is an indication you don't need to register the dll
See here for help - http://office.microsoft.com/en-us/outlook-help/enable-or-disable-add-ins-in-office-programs-HA010034127.aspx[^]
|
|
|
|
|
Thank You!
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Hi fellows,
How could I add apply nice formatting to the content area of body of the google calendar events?
Thanks
|
|
|
|
|
Work for Google.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I wish, but first i need to solve this milestone.
|
|
|
|
|
Hi all, I need to develop a progress bar in my web application which is in asp.net. This progress bar should see on screen while switching to new page of my application.
I have master page in which i have created diffrent menues.. like Audit,Manual,Update
on click of tht different pages will get disply.
so i want to disply progressbar on click of those menus
<td id="tdmnuPerfRating" valign="middle" align="center" style="width: 200px; height: 25px;
background-image: url(./images/grey_bg.jpg);" onmouseover="javascript:changecolor(this,'on');"
onmouseout="javascript:changecolor(this,'off');">
<asp:HyperLink ID="HyperLink3" runat="server" CssClass="CSMenu" Text="Performance Rating"
NavigateUrl="~/ViewAudit.aspx" />
</td>
<td align="center" valign="middle" style="width: 1px; height: 25px">
<div style="display: inherit;">
<img src="images/line_vertical.jpg" border="0" alt="Line" height="25px" /></div>
</td>
<td id="tdIssue" valign="middle" align="center" style="width: 200px; height: 25px;
background-image: url(./images/grey_bg.jpg);" onmouseover="javascript:changecolor(this,'on');"
onmouseout="javascript:changecolor(this,'off');">
<asp:HyperLink ID="HyperLink27" runat="server" CssClass="CSMenu" Text="Issues"
NavigateUrl="~/ViewIssues.aspx" />
</td>
|
|
|
|
|
Firstly, in the future when posting code snippets please format them using the "code block" menu item.
You will not be able to have the progress bar remain while navigating to another page in this manner. Remember the web is stateless so each request is rendered new to the browser, thus closing the current displayed page.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thaks for the your reply
|
|
|
|
|
i can read session in aspx.cs by using blow code.
Session["ID"] = "imsiTemp";
But It is not working in App_CODE Folder.
How can i read and write in App_code(.cs)?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
You have asked the same question just few days back. click here[^] for your question as well as answer.
|
|
|
|
|
Thank you!
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Hi,
Im implementing a roulette like chat in asp.net and i having some issues about the logic.
The basic flow of the application should be :
1. user signed in to the site
2. user requesting someone to chat to
3. the request is sent to the server and the server draws a random user to chat to
4. the two user start communicating,
The problem i seem to have is that when a user request is reaching the server and the server tries to draw a new user to chat to (lets say from a DB) , how i synchronize that user with the drawn one, because its a multi-thread environment the user that i drew may also did the same function and tried to drew a user to.
So i will face a problem that the first user assigned to himself the other user and the other user may assigned to himself other user as well.
Is this a common problem? and if so what is the common solutions?
thank you.
|
|
|
|
|
Hi
I am making a modification to a web application using XPath, and when executed I get an error message - Invalid token!
This is basic what I am doing
public xmlNode GetSelection (SelectParams params, xmldocument docment)
{
xpathstring = string.format("Name =\'{0}' Displaytag = \'{1}' Manadatory=\'{2}', params.Name, params.Displaytag, params.Manadatory);
return document.selectsinglenode(xpathstring);
}
As you can see, I am making a string and setting values on the nodes I am trying to find against my xml document, and thus returning xml data that matches my parameters.
What is happening is that I am getting an xpathexeception error in Visual Studio and it says invalid token.
I do know that in the xml document that the parameters I am looking in the tags have double quotes, for example, Name="ABC". So, I thought the problem could be solved using an "\".
Can anyone help?
|
|
|
|
|
Hi,
As far as I can see, you're trying to escape a single quote, not a double quote.
Wouldn't be much more acute to use double quote for the construction of your XPath string ?
xpathstring = string.format("Name=\"{0}\" Displaytag=\"{1}\" Mandatory=\"{2}\"", params.Name, params.Displaytag, params.Mandatory);
Remark 1 : Was your code snippet weel-formed ? Because the way you showed it to us, compiler wouldn't even accept to compile (you never close the string with the closing double-quote).
Remark 2 : If you are escaping the first single-quote, why don't you escape the second also ?
Remark 3 : While debugging, could you test for the value of xpathstring ? What does it show ?
Remark 4 : When you publish some code, please take the time to format it well and use <pre> tag.
|
|
|
|
|
I want to know if I can get the content of a mail message from my inbox and store it into a string.
thank from advance.
|
|
|
|
|
I didn't understand your question. Mail message is itself as string type.
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|