|
Grant Access Permission in DCOM Config for Network Service account (Application Pool user)
|
|
|
|
|
|
Keep the question as brief as possible. Also see this [link]
|
|
|
|
|
Hi,
I can see that, in my web.config file, my Entity Model set created the following connection string,
<add name="ConnStrDemo" connectionString="metadata=res://*/Models.SDB.csdl|res://*/Models.SDB.ssdl|res://*/Models.SDB.msl;provider=System.Data.SqlClient;provider connection string='Data Source=SDGSDG-PC\SQLEXPRESS;AttachDbFilename="D:\Demo\WebApp\App_Data\myDb.mdf";Integrated Security=True;MultipleActiveResultSets=True'"
providerName="System.Data.EntityClient" />
Obviously I need to change the data source part when I will deploy my web application my production server. My production server SQL Connection string should be something like this,
Server=XXX.XXX.XXX.XXX;Database=XXX;User ID=XXXX;Password=XXX;
Now, if I change the connection string from my web.config file to
<add name="ConnStrDemo" connectionString="Server=XXX.XXX.XXX.XXX;Database=XXX;User ID=XXXX;Password=XXX;" />
Will everything simply work in my production server ? I am afraid if the metadata part in the connection string is required by the Entity Framework or not. Please advice.
Regards.
|
|
|
|
|
|
Let me guess, you are using IE6. Is it? If so, then there are various issues with IE6. Almost whole world has moved to IE7/IE8. Why are you not?
In case it's not IE6, then how can you say it's a style issue. It looks fine. Did you try a sample POC that a generic issue for you or specific to this very istance? Build a sample and see if it's an issue there too.
|
|
|
|
|
How to replace text with image in word 2007 and save the file in .pdf format
this is my code
_wordapp.ActiveWindow.Selection.WholeStory();
_wordapp.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string temp = "";
temp = data.GetData(DataFormats.Text).ToString();
temp = temp.Replace("\r", "");
string[] arrtemp = temp.Split(Environment.NewLine.ToCharArray());
int pos = 0;
for (int t = 0; t < arrtemp.Length; t++)
{
if (arrtemp[t].Contains("Sign1"))
{
pos = t;
string fileName = GetSignPath(); //the picture file to be inserted
Object oMissed = _aDoc.Paragraphs[pos].Range; //the position you want to insert
Object oLinkToFile = false; //default
Object oSaveWithDocument = true;//default
_aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
File.Delete(fileName);
this.FindAndReplace("Sign1", "");
}
}
Its replacing at wrong place instead of where i wanted(i.e. in place of Sign1)
Sign1 is the text given in the Word 2007 to find and replace it with image
Instead it is placing sumwhere else only in the .pdf file
Please suggest me the solution code if possible to solve it
Its urgent
Thanks,
Harish
modified on Wednesday, August 4, 2010 10:21 AM
|
|
|
|
|
|
Why posting it at multiple forums? It is considered rude. Stick to one you find most appropriate for your question.
|
|
|
|
|
I believe you can use the SiteMapPath control in conjunction with your web.config to display a nice trail.
|
|
|
|
|
I want to send a mail message with an attached file. I have to get the file from the user's local computer via FileUpload control.
The real problem is that I have to use a System.Web.Mail.MailMessage object in order to do it, and it's not easy as using System.Net.Mail.MailMessage.
Does someone know how can I do it?
|
|
|
|
|
MailMessage mm = new MailMessage("from_address", "to_address");
byte[] atatchmentFile = FileUpload1.FileBytes;
MemoryStream memStream = new MemoryStream(atatchmentFile);
Attachment attachment = new Attachment(memStream, FileUpload1.FileName);
mm.Attachments.Add(attachment);
string smtpHost = "smtp.gmail.com";
string userName = "your_username@gmail.com";
string password = "your_password";
System.Net.Mail.SmtpClient mClient = new System.Net.Mail.SmtpClient();
mClient.Port = 587;
mClient.EnableSsl = true;
mClient.UseDefaultCredentials = false;
mClient.Credentials = new System.Net.NetworkCredential(userName, password);
mClient.Host = smtpHost;
mClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
mClient.Send(mm);
|
|
|
|
|
First of all, I want to thank you for answering, even though, your answer is unsatisfactory.
I know how to do it with system.net.mail namespace, but as I said before, I HAVE TO use system.web.mail namespace.
|
|
|
|
|
|
It doesn't depend on me...
|
|
|
|
|
|
|
Hi All i am using Ajax Timer on Master page
<pre>
<asp:Timer ID="UpdateTimer" runat="server" Interval="5000" OnTick="UpdateTimer_Tick">
</asp:Timer>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" ID="DateStampLabel" />
</ContentTemplate>
</asp:UpdatePanel>
</pre>
and in other page say a.aspx i am using autocomplete extender which call the web service
<pre>
<asp:Label ID="lblICDCode" runat="server" Text="ICD Code"></asp:Label><br />
<asp:TextBox ID="txtICDCode" runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtICDCode"
MinimumPrefixLength="3" ServiceMethod="GetICDCode" ServicePath="~/WebService.asmx"
FirstRowSelected="true" EnableCaching="true">
</cc1:AutoCompleteExtender>
</pre>
and a.aspx contain one add button
if i am clicking on that button i am getting permission denied in WebResource.axd.when i removed ajax timer from master page it is working fine and i am using free text box conptrol for rich text editor
how to fix this
regards,
amit
-- Modified Wednesday, August 4, 2010 2:59 AM
|
|
|
|
|
Amit Patel1985 wrote:
<asp:Timer ID="UpdateTimer" runat="server" Interval="5000" OnTick="UpdateTimer_Tick">
</asp:Timer>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" ID="DateStampLabel" />
</ContentTemplate>
</asp:UpdatePanel>
after add pre tag click preview button to view tag are well formatted. more readability reflect on count of answers. do update your question.
|
|
|
|
|
Hi All,
I am working on a 3-tier asp.net application. Currently I'm stuck up in a situation where I need to handle a specific type of exception (User Defined) in DAL and Show alert to the user if that exception occurs in DAL.
I tried following things:
1) I raised that exception from the DAL and catch it in BLL and throw a new BLL exception to for that DAL exception and finally catch it in the UI layer to show the alert to the user. I've successfully implement this in my project. But there are some issues in this approach. First of all I feel this is not right way to do this as it may lead to performance related issues. Secondly, the application contains more than 500 pages and classes. so I need to attach additional catch block in every method to catch the BLL exception. which is the last option i'd like to take.
2) in second approach I logged the the DAL exception into a text file. but problem in this approach is that how could the UI layer know that exception has occurred and show the alert to the user. Is there any event in asp.net where i could handle all this activities?
my question is what is the best approach to handle this type of situation? Will Exception handling block help me in this?
I've tried reading many articles on this but i couldn't get an answer for my question? I might not be using right keywords for my search.
Thanks in advance,
Regards,
Paramhans Dubey
|
|
|
|
|
How to replace text with image in word 2007 and save the file in .pdf format
this is my code
_wordapp.ActiveWindow.Selection.WholeStory();
_wordapp.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string temp = "";
temp = data.GetData(DataFormats.Text).ToString();
temp = temp.Replace("\r", "");
string[] arrtemp = temp.Split(Environment.NewLine.ToCharArray());
int pos = 0;
for (int t = 0; t < arrtemp.Length; t++)
{
if (arrtemp[t].Contains("Sign1"))
{
pos = t;
string fileName = GetSignPath(); //the picture file to be inserted
Object oMissed = _aDoc.Paragraphs[pos].Range; //the position you want to insert
Object oLinkToFile = false; //default
Object oSaveWithDocument = true;//default
_aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
File.Delete(fileName);
this.FindAndReplace("Sign1", "");
}
}
Its replacing at wrong place instead of where i wanted(i.e. in place of Sign1)
Sign1 is the text given in the Word 2007 to find and replace it with image
Instead it is placing sumwhere else only in the .pdf file
Please suggest me the code to solve it
Its urgent
Thanks,
Harish
|
|
|
|
|
raghvendrapanda wrote: Its replacing at wrong place instead of where i wanted(i
well your problem lies on the following code
raghvendrapanda wrote: pos = t;
t is your array index not position index within your text. You need to take into consideration word length as well, don't you?
|
|
|
|
|
Would u please guide me how i can do by taking length into consideration.
Thanks,
Harish
|
|
|
|
|
I already did, see my earlier message. You need to take the length of the word into account when calculating position
first position = length of first word
subsequent positions = last position + length of word at hand.
You need to make up for spaces as well. Good Luck.
|
|
|
|
|
Hi Yusuf,
Dude I tried but i am getting the exception.
_wordapp.ActiveWindow.Selection.WholeStory();
_wordapp.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string temp = "";
int temp1 = 0;
temp = data.GetData(DataFormats.Text).ToString();
temp = temp.Replace("\r", "");
//temp = System.Text.RegularExpressions.Regex.Replace(temp, @"\r", "");
temp1 = Convert.ToInt32(temp.Length);
temp1 = temp.IndexOf("Sign1");
for (int t = arrtemp.Length - 1; t > 0; t--)
{
if (arrtemp[t].Contains("Sign1"))
{
//pos = t;
string fileName = GetSignPath(); //the picture file to be inserted
Object oMissed = _aDoc.Paragraphs[temp1].Range; //the position you want to insert
Object oLinkToFile = false; //default
Object oSaveWithDocument = true;//default
_aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
//_wordapp.Selection.InlineShapes.AddPicture(fileName,ref oFalse, ref oTrue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
_wordapp.Selection.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
File.Delete(fileName);
this.FindAndReplace("Sign1", fileName);
}
I am getting exception at below mentioned line
Object oMissed = _aDoc.Paragraphs[temp1].Range;
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsFormsApp_Templates.exe
Additional information: The requested member of the collection does not exist.
Need help.Got stuck at this place.
Thanks,
Harish
|
|
|
|