|
Hi Navaneeth,
What should i have to use instead of StreamReader? i have to return a soap message to the client.
Thanks.
|
|
|
|
|
Hard to tell without knowing much about the problem you are trying to solve. What are you expecting by returning a StreamReader ? Are you trying to send contents of a file?
|
|
|
|
|
No not the content of a file.
Im getting soap envelopes from the server back through my webservice and i have to send this xml to the client that uses my service.
StreamReader HttpSOAPRequest(String xmlfile, string proxy)
{
XmlDocument doc = new XmlDocument();
doc.Load(@"C:\Inetpub\wwwroot\ASP.NET\" +xmlfile);
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://uddi.microsoft.com/inquire");
if (proxy != null) req.Proxy = new WebProxy(proxy,true);
req.Headers.Add("SOAPAction","\"\"");
req.ContentType = "text/xml;charset=\"utf-8\"";
req.Accept = "text/xml";
req.Method = "POST";
Stream stm = req.GetRequestStream();
doc.Save(stm);
stm.Close();
WebResponse resp = req.GetResponse();
stm = resp.GetResponseStream();
StreamReader r = new StreamReader(stm);
return r;
}
modified on Tuesday, August 4, 2009 2:19 PM
|
|
|
|
|
hi,
This code is working for me. but the grid cells take too many height and width (Cellspacing&Cellpadding). how can i reduce the space between teh cells content.
<asp:GridView ID="grdResult" runat="server" AutoGenerateColumns="False" OnRowDataBound="grdResult_RowDataBound" CellPadding="0" CellSpacing="0">
<Columns>
<asp:TemplateField HeaderText="PharmacyID" ConvertEmptyStringToNull="false">
<ItemTemplate>
<pre> <asp:LinkButton ID="lnkPatientID" runat="server" Text='<%#Eval("PharmacyID") %>'
CommandName="PharmacyName" CommandArgument='<%#Eval("PharmacyID" )%>'></asp:LinkButton></pre>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="NABP" ConvertEmptyStringToNull="false">
<ItemTemplate>
<pre><asp:LinkButton ID="lnkNABP" runat="server" Text='<%#Eval("NABP") %>' CommandName="PharmacyName"
CommandArgument='<%#Eval("PharmacyID") %>'></asp:LinkButton></pre>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Storename" ConvertEmptyStringToNull="false">
<ItemTemplate>
<pre><asp:LinkButton ID="lnkStorename" runat="server" Text='<%#Eval("Storename")%>' CommandArgument='<%#Eval("PharmacyID") %>'
CommandName="PharmacyName"></asp:LinkButton></pre>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address1" ConvertEmptyStringToNull="false">
<ItemTemplate>
<pre><asp:LinkButton ID="lnkAddress1" runat="server" Text='<%#Eval("Address1")%>' CommandName="PharmacyName"
CommandArgument='<%#Eval("PharmacyID") %>'></asp:LinkButton></pre>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="City" ConvertEmptyStringToNull="false">
<ItemTemplate>
<pre><asp:LinkButton ID="lnkCity" runat="server" Text='<%#Eval("City") %>' CommandArgument='<%#Eval("PharmacyID")%>'
CommandName="PharmacyName"></asp:LinkButton></pre>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="NPI" ConvertEmptyStringToNull="false">
<ItemTemplate>
<pre><asp:LinkButton ID="lnkNPI" runat="server" Text='<%#Eval("NPI") %>' CommandName="PharmacyName"
CommandArgument='<%#Eval("PharmacyID") %>'></asp:LinkButton></pre>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle BackColor="#FDF3A5" BorderColor="#C9C7B3" />
<RowStyle Font-Names="Verdana" Font-Size="11px" />
<PagerStyle HorizontalAlign="Right" />
</asp:GridView>
modified on Tuesday, August 4, 2009 10:54 AM
|
|
|
|
|
Well.. this is not the simplle check if Session == null.
In a global.asax file I log in a table the sessionID of a user. In the Session_End i add to that logline the date the session expired. well that works!
But if a user chooses to close the browser in stead of logging out of an application....The additional logline with date session expiration is not saved.
In an overview page I see that according to the database some sessions are days old while the session timeout is set for 2 hours.
When I retrieve the data from the database is it possible to check with the IIS server if the found SessionID in the database is still valid for IIS?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
|
thank you. this is helping me investigating further on
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Obviously you can assume any session over two hours is not valid.
A common practice I've noticed for this situation is to use a bit of AJAX to capture the browser events, whether an actual close or just navigating away from your site, and update the database to logout the user.
only two letters away from being an asset
|
|
|
|
|
digimanus wrote: When I retrieve the data from the database is it possible to check with the IIS server if the found SessionID in the database is still valid for IIS?
No. You can't get this.
Two things you can try,
1 - Handle browsers close event using JS and do AJAX call to update the database. This method is less reliable as JS can be manipulated from client side.
2 - Write a DB job which executes on specific intervals, check the validity of records and updates the records that are inactive for long time. For this to work, you may need to keep the last request time as well.
|
|
|
|
|
Hi friends.
Is it possible to display content in web page in some font style if that font file is not installed on the server?
If yes, please guide me.
thanks
Imrankhan
please don't forget to vote on the post that helped you.
|
|
|
|
|
The browser can only use fonts installed on the client machine anyway, so whether the server has the font installed or not is irrelevant. You should stick to fonts common to all operating systems to ensure consistency.
|
|
|
|
|
I want to download a file from an URL address(for example--> Http://10.10.10.27/Publish/test.wav) to a client system. I'm testing many way to coding this part but i didn't get answer.
please help me.
thank you.
|
|
|
|
|
Member 6291554 wrote: Http://10.10.10.27/Publish/test.wav
What does Publish mean here?
Sundeep
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
|
|
|
|
|
What are you having difficulty with You create a hyperlink that points to the file in question
only two letters away from being an asset
|
|
|
|
|
I've a list of directory files that when i change selected files coping selected file to client system("C:\\Test.wav").
And then play file on client side. I'm writing source of play part but for copying i've a problem.
My project is working on my system but when publish my site not working.
|
|
|
|
|
You're just confusing the issue even more. Is this a client/server app or a web app?
only two letters away from being an asset
|
|
|
|
|
|
Use the WebRequest[^] class
WebRequest request = new WebRequest(url);<br />
HttpWebResponse response = request.GetResponse();<br />
Stream download = response.GetResponseStream();
only two letters away from being an asset
|
|
|
|
|
Thank you Mr Mark Nischalke.
|
|
|
|
|
How to have mulitple rows in header template of datagrid, or datalist or repeater.I want header like following..........
| col2col3mixed |
col1 |---------------|col4
| col2 | col3 |
How to do this?
|
|
|
|
|
Hi all,
My asp.net application is not working in mozilla firefox,
But it is working perfectly in IE6.
when i click on login button it is giving password wrong,if i run it on IE,login is successful.
I have some javascript code in my source page of the login page.
What might be the reason for this>
I have tested it in linux o.s with mozilla.
Can any body respond to this?
kissy
|
|
|
|
|
Kissy16 wrote: I have some javascript code in my source page of the login page.
I guess you are getting some problem with javascript. Please show us the javascript code.
|
|
|
|
|
Below script am using for password encryption
function sendData(salt)
{
//var FORM = document.form[0];
if (document.forms[0].DDL_Distname.value == "Select District")
{
alert("plz enter user name.");
return false;
}
if (document.forms[0].Txt_password.value != "")
{
document.forms[0].Txt_password.value = hex_md5(document.forms[0].Txt_password.value);
document.forms[0].Txt_password.value = hex_md5(salt+document.forms[0].Txt_password.value);
}
else
{
alert("plz enter password.");
return false;
}
return true;
}
</script>
<script language="javascript" type="text/javascript">
window.history.forward(1);
</script>
kissy
|
|
|
|
|
Hi all,
When Im trying to execute my page through localhost like this
http://localhost/default.aspx
im getting the following error
HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services.
Please tell me what are the possible causes and how my page can execute?
|
|
|
|
|
Hi,
open the MMC IIS, select your virtual directory (did you forgot to set one?) and grant execution rights (checkboxes on the first tab).
Regards
Sebastian
|
|
|
|