I'm using this below code to create pdf file from ssrs report on button click.It was working fine when i run the project on my local system,but when i hosted it on ISS i'm unable to view the pdf file as o/p.Plz suggest the solution ASAP..
protectedvoid btnAuthenticateAndPrint_Click(object sender, EventArgs args)
//SSRS Report Print
//Getting Values from grid
LinkButton lb = (LinkButton)sender;
GridViewRow row = (GridViewRow)lb.NamingContainer;
Label lbOrderID = row.FindControl("lbOrderID") as Label;
int OrderId = Convert.ToInt32(lbOrderID.Text);
da = new SqlDataAdapter("Get_PODetails", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
ds = new DataSet();
if (ds.Tables["PO"].Rows.Count > 0)
lblVendid.Text = ds.Tables["PO"].Rows["MVDI_ID"].ToString();
lblBranch.Text = ds.Tables["PO"].Rows["MBRI_ID"].ToString();
lblDate.Text = Convert.ToDateTime(ds.Tables["PO"].Rows["MPDI_Date"]).ToString("dd-MMM-yyyy");
//Setting/Referencing Report Server
rs = new RSWebService.ReportingService2005();
rsExec = new REWebService.ReportExecutionService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://localhost/ReportServer/ReportService2005.asmx";
rsExec.Url = "http://localhost/ReportServer/ReportExecution2005.asmx";
byte Sendresults = null;
byte bytes = null;
string historyID = null;
string deviceInfo = @"<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>";
string format = "PDF";
string encoding = null;
string mimeType = null;
string extension = null;
//string fileName = "somefilename.txt";
REWebService.Warning warnings = null;
string streamIDs = null;
//Getting Report Name
string _reportName = @"/FIMO GOF Assets Reports/GOF PURCHASE ORDER";
REWebService.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
//Getting Report Parameters
REWebService.ParameterValue parameters = new REWebService.ParameterValue;
parameters = new REWebService.ParameterValue();
parameters.Name = "MVDI_ID";
parameters.Value = lblVendid.Text;
parameters = new REWebService.ParameterValue();
parameters.Name = "MBRI_ID";
parameters.Value = lblBranch.Text;
//parameters = new REWebService.ParameterValue();
//parameters.Name = "MPDI_Date";
//parameters.Value = lblDate.Text;
parameters = new REWebService.ParameterValue();
parameters.Name = "MPDI_DocNo";
parameters.Value = lblPOId.Text;
//Assingning to byte stream
Sendresults = rsExec.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
MemoryStream ms = new MemoryStream(Sendresults);
//To create a PDF file from byte stream
FileStream stream = File.Create("Asset Module/Reports/PO_Report.PDF");
stream.Write(Sendresults, 0, Sendresults.Length);
//Getting the PDF as Output
Label lbpath1 = new Label();
lbpath1.Text = "Reports/PO_Report.PDF";
FileInfo f = new FileInfo(Server.MapPath(lbpath1.Text));
System.Diagnostics.Process.Start(@"" + f.FullName + "");
catch (Exception Ex)
Url expects the local system to have report server. Does the system where you are hosting it has report server installed? It is always good to give proper URL with server name instead of localhost. Like: http://machineServerName/Reportserver
I am getting an error on My asp.net page ONLY ON FIRST LOAD
Could notloadfileorassembly'System.Runtime, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'or one of its dependencies. The system cannot find the file specified.
Line 131: <linkrel="Stylesheet"type="text/css"href="~/CSS/DropBoxStyles.css"/>
Line 132: <formclass="fContent"id="mform"runat="server">
Line 133: <asp:ScriptManagerID="ScriptManager1"runat="server">
Line 134: </asp:ScriptManager>
Line 135: <divid="adminBar"class="AdminTool"runat="server">
Can someone help me with this . it only happens shen i just started the web app , after that if i refresh its fine
Answer only if you have a suggestion on how to fix , I can use google too(didnt help much).
I cannot exactly figure out how the scroll position is measured.
I have a container with a specific height (400) and some elements (30) in it with specific heights (18). The container displays about 7.2 items in it. The maximum scroll position in firefox is 142. In chrome 141.
If the container can display an exact number of items then the calculation is simple: number-of-items * item-height - container-height.
But how is it calculated if the container displays 7.2 items?
And worse, if the container has padding top and bottom?
I am exploring the best web framework to write a community service like portal. The portal includes components such as Calendar, Membership, Committees,...etc. There are many web frameworks (ASP.net, PHP, Joomla, WordPress, DNN, ...etc). Which is the best web framework/language to write such portal. The website needs to be database driven, secure and easy to maintain. Please give your advise according to your experience.
according to my personal experience i will support for PHP because i heard that SQL cant be Mixed up Java oriented web page..i.e., HTML driven sites..but php it is possible it seems but i dont know how it works..because i only developed the websites using HTML
My vote is for WordPress for what it's worth. It is easier to use than Joomla or Drupal, is database driven, highly customizeable if you can write even a little PHP, HTML or CSS, and a lot of the tedious mind numbing coding is already done so you can concentrate on what you are trying to achieve with the site.
got a big problem ...
We got a task we cant solve (Obviously, if we could i wouldnt ask here).
Our task is:
A page with 2 Textfields and 1 Button.
You shall be able to enter nothing else than numbers in these Textfields (floats or ints, nevermind)
When you enter a value to the last Text Field, there should automatically appear a new Text Field under the others.
So that you can enter as many numbers as you want to.
The button shall sum these numbers.
BUT the sum shall be displayed on another page, and the sum itself shall be calculated on the first page and shall be saved in Beans class.
So, we made 2 pages and one bean.
Numbers.jsp, Sum.jsp and Add (this is the bean)
The Sum.jsp takes the bean and just displays the result.
Thats very easy ...
Our Problem is, we dont know how to write into the bean from dynamically generated textfields and without pressing a button, because the button shall redirect to Sum.jsp.
Right now we have a workaround ... we reload the page and take the "request.getParametersMap()" and write this into the bean.
But we dont like this idea very much ...
So what you want is for us to do your homework for you. That isn't going to happen. You will learn nothing if someone else does this for you.
Make an effort. If you run into problems, post the code specific questions you have here and we'll be more than happy to help.
Well, no i dont want you to do my homework ...
We already spent hours on this task, but we dont find a way to solve it in a proper way.
We just want to know how to save from dynamic generated text fields into a bean.
As far as i know you can use "c:set" just in your HTML-Code.
Server just knows about them if we send a new request, but thats quite "dirty code"
Let me start off by saying that I apologize in advanced if this isn't the correct forum for this question, but there didn't seem to be a forum that exactly matched the question/issue I'm having.
I'm a VB.NET developer and I like to expand by knowledge by trying to program things from scratch that are already implemented ih the.NET framework. My current project is programming a SMTP server using just sockets. I've already read the RFC on SMTP and my company has an Exchange Server (2007) that I was going to use for testing.
The web address of the server is exchange.mycompany.com and I used reverse DNS to get the IP adress. The domain name does have a MX record a well. From the command prompt on my computer (which is running Win7 Professional) I tried using telnet to connect on port 25. I tried using the domain name as well as the IP address, but both times it said it couldn't connect to the server on port 25.
I checked the settings ih Outlook and the port is correct. I then tried connecting on port 110, and some other ones that are sometimes used, and it gave the same error message.
Next I connected to the Exchange server through VPN and tried telnet again on port 25 and this time it worked. However in the SMTP banner it said remote.mycompany.com instead of exchange.mycompany.com. So I disconnected from the VPN and tried the telnet again on all the ports I initially tried but used remote.mycompany.com but again got the same error message. I did an IP address lookup and remote.mycompany.com and exchange.mycompany.com point to the same IP address.
I then used mxtools.com and dnsstuff.com (I think that was the adress) and used their SMTP tools to see of they could connect. I entered mycompany.com as the domain name and they looked up the MX record, which returns exchange.mycompany.com as the SMTP server, and both tools were able to connect with no issues identified.
So my questions: 1) If the MX record list exchange.mycompany.com as the SMTP sever, why does the banner return remote.mycompany.com? 2) Why can't I connect the SMTP server through telnet unless I'm connected through VPN, but the two websites I used to test it the connection worked?
Obviously the server works because because the two websites can connect to it, I can when I'm in VPN, and other servers can because I receive email on my corporate account. What could prevent my computer from connecting to the SMTP server through telnet when I'm not on VPN. I should also mention that I even tried turning off all my anti-virus software to make sure that it wasn't blocking it.
Any help would be greatly appreciated since I assuming if I can't telnet in I most likely wouldn't be able to connect through sockets so I can't start working on my project until I solve this.
It is unlikely that you can connect directly from home to your company server through normal internet, as most company exchange servers do not allow connections from outside their intranet. When you use VPN you are, presumably, going via the company's intranet and thus seen as a valid user.
One of these days I'm going to think of a really clever signature.
I'm not trying to connect to it so I can send an email through the server. What I was trying to understand how to do was to deliver and email to it. For example, if I build an SMTP server and a client which connects to my that SMTP server and I want to send an email to email@example.com (where mycompany.com is hosted on the Exchange server), how would the SMTP server I created connect to the Exchange server in order to deliver the email? Doesn't the Exchange server have to allow some sort of connection from outside the intranet in order to receive emails from other domains (gmail, yahoo, etc.)?
I'm going to have to try and do that, unfortunately the person who set it up is no longer with the company and we just have an outsourced IT company that maintains it and they usually aren't very help fully. However, because the web tools were able to connect to is it reasonable to assume the problem is on my end? I was thinking maybe because I dont have a domain name so if the Exchange server tries to lookup the IP address of my computer there is no MX or PTR record. Is this something SMTP servers look for?
I also found something that I dont know how to explain or how it may affect this. The MX record for the server list exchange.mycompany.com. However, even when I'm on VPN, I can't connect to the SMTP server using that address in telnet or the IP address it points to. I have to use remote.mycompany.com, which is shown in the SMTP banner and points to the SAME IP ADDRESS. Is there a setting in Exchange that makes it script only request coming from this address? If so, how do the online SMTP tools discover this subdomain when I only gave the tools the domain name (mycompany.com) and the MX record only shows exchange.mycompany.com? The address remote.mycomany.com is not located anywhere in the zone file.