Set Valign of TD (cell) to top
Set top padding of TD (cell) to 5 or something.
I'm a computer programmer based in Roche, St. Austell, Cornwall with over 7 years of experience in IT. I mostly work with ASP.NET, MS SQL Server and MS Access. This blog contains the knowledge I've gained over the years. Posted mostly as rough notes, I welcome any comments. I hope you might find my blog useful.
Search

Custom Search
Subscribe via email
Showing posts with label vb. Show all posts
Showing posts with label vb. Show all posts
Tuesday, October 19, 2010
page goes on top during validationsummary update even if maintainscrollbackposition or smartnavigation is on
set enableclientscript=false in all validators including the summary
detecting what mode the Formview would be changed to in modechanging
If (e.NewMode = FormViewMode.[Insert]) Then
Labels:
asp.net,
detecting formview move,
formview,
formviewmode,
insert,
modechanging,
newmode,
sql server,
vb
creating an insert with sqldatasource without a GV or FV
in sqldatasource do like this:
<InsertParameters>
<asp:ControlParameter Name="Login" Type="String" ControlID="ACT_Login" />
<asp:ControlParameter Name="Date" Type="DateTime" ControlID = "ACT_Date" />
<asp:ControlParameter Name="IP" Type="String" ControlID = "ACT_IP"/>
</InsertParameters>
notice that controlID is pointing to the ID of a textbox somewhere on the page (can be invisible or colored to blend in with the background). also note that controlparameter is used not just parameter.
<InsertParameters>
<asp:ControlParameter Name="Login" Type="String" ControlID="ACT_Login" />
<asp:ControlParameter Name="Date" Type="DateTime" ControlID = "ACT_Date" />
<asp:ControlParameter Name="IP" Type="String" ControlID = "ACT_IP"/>
</InsertParameters>
notice that controlID is pointing to the ID of a textbox somewhere on the page (can be invisible or colored to blend in with the background). also note that controlparameter is used not just parameter.
Labels:
asp.net,
controlID,
controlparameter,
gridview,
insert,
insertparameters,
sql server,
sqldatasource,
t-sql,
vb
Formview changes to Edit mode after inserted in Inserted mode. Possible issue with formview.visiblefalse and using viewstate such as smartnavigation=true
Protected Sub FormView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertedEventArgs) Handles FormView1.ItemInserted
REM Handling Insert Mode of FV
REM If a record has been inserted, the formview tends to change to Edit mode for some reason, probably because
REM the viewstate. Therefore this code enables it to revert back to Insert mode.
REM Rest in Formview.ModeChanged() and btn_New.load()
Session("Inserted") = "true"
REM Show alert on deleted
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "New", "alert('Successfully Added New Record');", True)
End Sub
Protected Sub FormView1_ModeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView1.ModeChanged
REM Handling Insert Mode of FV
REM If a record has been inserted, the formview tends to change to Edit mode for some reason, probably because
REM the viewstate. Therefore this code enables it to revert back to Insert mode.
REM Rest in Formview.ItemInserted() and btn_New.load()
If Session("Inserted") = "true" Then
Session("Inserted") = "false"
FormView1.ChangeMode(FormViewMode.Insert)
End If
End Sub
Protected Sub BTN_New_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_New.Click
REM Handling Insert Mode of FV
REM If a record has been inserted, the formview tends to change to Edit mode for some reason, probably because
REM the viewstate. Therefore this code enables it to revert back to Insert mode.
REM Rest in Formview.ItemInserted() and btn_New.load()
REM Since SQLDATASOURCE uses a WHERE clause on dates from and to, therefore its necessary to populate the fields before execution of filter.
If FTR_Date_of_Entry_From.Text.Trim = "" Then
FTR_Date_of_Entry_From.Text = "01 Jan 1900"
End If
If FTR_Date_of_Entry_To.Text.Trim = "" Then
FTR_Date_of_Entry_To.Text = "31 Dec 2090"
End If
If FTR_Date_of_Entry_From.Text.Trim = "" And FTR_Date_of_Entry_To.Text.Trim <> "" Then
FTR_Date_of_Entry_From.Text = "01 Jan 1900"
End If
If FTR_Date_of_Entry_To.Text.Trim = "" And FTR_Date_of_Entry_From.Text.Trim <> "" Then
FTR_Date_of_Entry_To.Text = "31 Dec 2090"
End If
REM Control visibility of controls
FormView1.Visible = True
GridView1.Visible = False
GridView_Login.Visible = False
ReportViewer1.Visible = False
RPT_Adjuster.Visible = False
GridView_Activity.Visible = False
GridView_Manage_Province.Visible = False
FormView_Manage_Province.Visible = False
GridView_Manage_District.Visible = False
FormView_Manage_District.Visible = False
GridView_Manage_Hospital.Visible = False
FormView_Manage_Hospital.Visible = False
FormView_Manage_Caterer_Name.Visible = False
GridView_Manage_Caterer_Name.Visible = False
FormView_Manage_Food_Item.Visible = False
GridView_Manage_Food_Item.Visible = False
FormView_Feedback.Visible = False
GridView_Feedback.Visible = False
REM ...Continuing with other commands
FormView1.ChangeMode(FormViewMode.Insert)
End Sub
REM Handling Insert Mode of FV
REM If a record has been inserted, the formview tends to change to Edit mode for some reason, probably because
REM the viewstate. Therefore this code enables it to revert back to Insert mode.
REM Rest in Formview.ModeChanged() and btn_New.load()
Session("Inserted") = "true"
REM Show alert on deleted
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "New", "alert('Successfully Added New Record');", True)
End Sub
Protected Sub FormView1_ModeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView1.ModeChanged
REM Handling Insert Mode of FV
REM If a record has been inserted, the formview tends to change to Edit mode for some reason, probably because
REM the viewstate. Therefore this code enables it to revert back to Insert mode.
REM Rest in Formview.ItemInserted() and btn_New.load()
If Session("Inserted") = "true" Then
Session("Inserted") = "false"
FormView1.ChangeMode(FormViewMode.Insert)
End If
End Sub
Protected Sub BTN_New_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_New.Click
REM Handling Insert Mode of FV
REM If a record has been inserted, the formview tends to change to Edit mode for some reason, probably because
REM the viewstate. Therefore this code enables it to revert back to Insert mode.
REM Rest in Formview.ItemInserted() and btn_New.load()
REM Since SQLDATASOURCE uses a WHERE clause on dates from and to, therefore its necessary to populate the fields before execution of filter.
If FTR_Date_of_Entry_From.Text.Trim = "" Then
FTR_Date_of_Entry_From.Text = "01 Jan 1900"
End If
If FTR_Date_of_Entry_To.Text.Trim = "" Then
FTR_Date_of_Entry_To.Text = "31 Dec 2090"
End If
If FTR_Date_of_Entry_From.Text.Trim = "" And FTR_Date_of_Entry_To.Text.Trim <> "" Then
FTR_Date_of_Entry_From.Text = "01 Jan 1900"
End If
If FTR_Date_of_Entry_To.Text.Trim = "" And FTR_Date_of_Entry_From.Text.Trim <> "" Then
FTR_Date_of_Entry_To.Text = "31 Dec 2090"
End If
REM Control visibility of controls
FormView1.Visible = True
GridView1.Visible = False
GridView_Login.Visible = False
ReportViewer1.Visible = False
RPT_Adjuster.Visible = False
GridView_Activity.Visible = False
GridView_Manage_Province.Visible = False
FormView_Manage_Province.Visible = False
GridView_Manage_District.Visible = False
FormView_Manage_District.Visible = False
GridView_Manage_Hospital.Visible = False
FormView_Manage_Hospital.Visible = False
FormView_Manage_Caterer_Name.Visible = False
GridView_Manage_Caterer_Name.Visible = False
FormView_Manage_Food_Item.Visible = False
GridView_Manage_Food_Item.Visible = False
FormView_Feedback.Visible = False
GridView_Feedback.Visible = False
REM ...Continuing with other commands
FormView1.ChangeMode(FormViewMode.Insert)
End Sub
Referencing values of selectcommand while item is being inserted / updated in GV / FV
Use on iteminserting or itemupdating
'REM ***** Changing all 0s in Integer Fields and 01 Jan 1900 in DateTime Field to NULL *****
'If (str_tmp_FV_Item__Temp_Date_of_EntryTextBox.ToUpper = "01 JAN 1900" Or str_tmp_FV_Item__Temp_Date_of_EntryTextBox.ToUpper = "1 JAN 1900") Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(4) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_DaigsTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(5) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_RotisTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(7) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_Bene_MaleTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(8) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_Bene_FemaleTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(9) = ""
'End If
'If str_tmp_FV_Item__Temp_Daily_Cost_Per_PersonTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(10) = ""
'End If
'REM ***** Changing all 0s in Integer Fields and 01 Jan 1900 in DateTime Field to NULL *****
'If (str_tmp_FV_Item__Temp_Date_of_EntryTextBox.ToUpper = "01 JAN 1900" Or str_tmp_FV_Item__Temp_Date_of_EntryTextBox.ToUpper = "1 JAN 1900") Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(4) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_DaigsTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(5) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_RotisTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(7) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_Bene_MaleTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(8) = ""
'End If
'If str_tmp_FV_Item__Temp_No_of_Bene_FemaleTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(9) = ""
'End If
'If str_tmp_FV_Item__Temp_Daily_Cost_Per_PersonTextBox = "0" Then
' REM Referencing order of InsertCommand="INSERT INTO [Data] ([Province], [District], [Hospital], [Caterer_Name], [Date_of_Entry], [Date_of_Entry], [Food_Item], [No_of_Rotis], [No_of_Bene_Male], [No_of_Bene_Female], [Daily_Cost_Per_Person]) VALUES (@Province, @District, @Hospital, @Caterer_Name, @Date_of_Entry, @Date_of_Entry, @No_of_Daigs, @Food_Item, @No_of_Rotis, @No_of_Bene_Male, @No_of_Bene_Female, @Daily_Cost_Per_Person)"
' e.Values(10) = ""
'End If
TRIMMING ALL values before insert into db
Put it in formview.iteminserting() or itemupdating()
REM ***** TRIMMING ALL values before insert into db *****
For i As Integer = 0 To e.Values.Values.Count - 1
e.Values(i) = e.Values(i).ToString().Trim()
Next
REM ***** TRIMMING ALL values before insert into db *****
For i As Integer = 0 To e.Values.Values.Count - 1
e.Values(i) = e.Values(i).ToString().Trim()
Next
Labels:
asp.net,
database,
insert,
sql server,
t-sql,
trimming values,
vb
Doing the COMPARISON to see if INTEGER VALUES have Leading 0's
Put it in formview.iteminserting() or itemupdating()
REM ***** Doing the COMPARISON to see if INTEGER VALUES have Leading 0's *****
Dim Temp_Int As Integer
If Integer.TryParse(e.Values("No_of_Daigs"), Temp_Int) = True Then
e.Values("No_of_Daigs") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("No_of_Rotis"), Temp_Int) = True Then
e.Values("No_of_Rotis") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("No_of_Bene_Male"), Temp_Int) = True Then
e.Values("No_of_Bene_Male") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("No_of_Bene_Female"), Temp_Int) = True Then
e.Values("No_of_Bene_Female") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("Daily_Cost_Per_Person"), Temp_Int) = True Then
e.Values("Daily_Cost_Per_Person") = Temp_Int.ToString()
End If
REM ***** Doing the COMPARISON to see if INTEGER VALUES have Leading 0's *****
Dim Temp_Int As Integer
If Integer.TryParse(e.Values("No_of_Daigs"), Temp_Int) = True Then
e.Values("No_of_Daigs") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("No_of_Rotis"), Temp_Int) = True Then
e.Values("No_of_Rotis") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("No_of_Bene_Male"), Temp_Int) = True Then
e.Values("No_of_Bene_Male") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("No_of_Bene_Female"), Temp_Int) = True Then
e.Values("No_of_Bene_Female") = Temp_Int.ToString()
End If
If Integer.TryParse(e.Values("Daily_Cost_Per_Person"), Temp_Int) = True Then
e.Values("Daily_Cost_Per_Person") = Temp_Int.ToString()
End If
Doing the COMPARISON to see if INTEGER VALUES are 0's
Put it in formview.iteminserting() or itemupdating()
REM ***** Doing the COMPARISON to see if INTEGER VALUES are 0's *****
If e.Values("No_of_Daigs") = "0" Then
e.Values("No_of_Daigs") = ""
End If
If e.Values("No_of_Rotis") = "0" Then
e.Values("No_of_Rotis") = ""
End If
If e.Values("No_of_Bene_Male") = "0" Then
e.Values("No_of_Bene_Male") = ""
End If
If e.Values("No_of_Bene_Female") = "0" Then
e.Values("No_of_Bene_Female") = ""
End If
If e.Values("Daily_Cost_Per_Person") = "0" Then
e.Values("Daily_Cost_Per_Person") = ""
End If
REM ***** Doing the COMPARISON to see if INTEGER VALUES are 0's *****
If e.Values("No_of_Daigs") = "0" Then
e.Values("No_of_Daigs") = ""
End If
If e.Values("No_of_Rotis") = "0" Then
e.Values("No_of_Rotis") = ""
End If
If e.Values("No_of_Bene_Male") = "0" Then
e.Values("No_of_Bene_Male") = ""
End If
If e.Values("No_of_Bene_Female") = "0" Then
e.Values("No_of_Bene_Female") = ""
End If
If e.Values("Daily_Cost_Per_Person") = "0" Then
e.Values("Daily_Cost_Per_Person") = ""
End If
Labels:
asp.net,
comparing integer values,
comparison,
e.values,
sql server,
vb
Doing the COMPARISON to see if ALL are NULL
Put it in formview.iteminserting() or itemupdating()
REM ***** Doing the COMPARISON to see if ALL are NULL *****
Dim null_count As Integer = 0
For i As Integer = 0 To e.Values.Values.Count - 1
REM If any value is not null, let it insert
If e.Values(i) = "" Then
null_count += 1
End If
Next
If null_count = e.Values.Values.Count Then
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "Not Inserted", "alert('Record not inserted, all fields are blank.');", True)
e.Cancel = True
End If
REM ***** Doing the COMPARISON to see if ALL are NULL *****
Dim null_count As Integer = 0
For i As Integer = 0 To e.Values.Values.Count - 1
REM If any value is not null, let it insert
If e.Values(i) = "" Then
null_count += 1
End If
Next
If null_count = e.Values.Values.Count Then
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "Not Inserted", "alert('Record not inserted, all fields are blank.');", True)
e.Cancel = True
End If
Labels:
asp.net,
comparing all values,
handling nulls,
sql server,
vb
Full Website Webserver configuration: Port Forwarding on Router to configure global ip of router to work with local webserver of local pc / Setup of IIS / Firewall Setup
Select Application -> Port Forwarding
Add static IP in router
Publish Post
Make sure IP address added in LAN properties (little computer on taskbar) has a static ip defined instead of automatic.
See your own ip which is defined as IP Addres after doing ipconfig from cmd
IIS Setup: In IIS manager set port 8000 and set ip to all unassigned.
In port forwarding of router add a new user rule
Keep web access control off..making sure to place 0.0.0.0 in remote ip and remote netmask if you plan to turn it on
Keep firewall on
In PC firewall do like this:
Do not enable DMZ in router
Deployment to IIS (XP and Windows Server)
Labels:
asp.net,
aztech,
DMZ,
DSL 605EU,
firewall,
global ip,
IIS,
live ip,
port forwarding,
router,
setup firewall,
sql server,
vb,
webserver,
windows server,
xp
Deployment to IIS (XP and Windows Server)
· This procedure assumes integrated security method is used.
· In physical folder properties give permission to user ASPNET
· Browse to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data and give permission to DB and its log file there.
· Go into Sql server management studio, select security folder -> logins folder ...choose most of the
· Required logins especially ASPNET and NETWORK SERVICE, select properties, choose User Mapping and select the db in question and then select 'db_datareader' and 'db_datawriter' role memberships.
· To prevent firefox from asking for authentication…go into IIS manager and select properties of the virtual directory...choose directory security...press edit...click browse on anonymous access...specify an admin password for the current pc...put its password..uncheck allow iis to control password...press ok. Troubleshooting: Make sure to set it to anonymous password or reset the password if system administrator password is changed.
· Conn. Str in web.config <add name="Lungar ProjectConnectionString" connectionString="Data Source=(local);Initial Catalog=LP;User Id=sa; Password=admin;Persist Security Info=True;Min Pool Size=5" providerName="System.Data.SqlClient" /> (only for Windows Server 2003)
· Change DB Name to LP in SSMS (only for Windows Server 2003)
· Select version 2.0 in IIS website or Virtual Directory properties ASP.NET tab.
Make sure file permissions of the directory are given to child objects as well if contents in the directory is copied again.
· In physical folder properties give permission to user ASPNET
· Browse to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data and give permission to DB and its log file there.
· Go into Sql server management studio, select security folder -> logins folder ...choose most of the
· Required logins especially ASPNET and NETWORK SERVICE, select properties, choose User Mapping and select the db in question and then select 'db_datareader' and 'db_datawriter' role memberships.
· To prevent firefox from asking for authentication…go into IIS manager and select properties of the virtual directory...choose directory security...press edit...click browse on anonymous access...specify an admin password for the current pc...put its password..uncheck allow iis to control password...press ok. Troubleshooting: Make sure to set it to anonymous password or reset the password if system administrator password is changed.
· Conn. Str in web.config <add name="Lungar ProjectConnectionString" connectionString="Data Source=(local);Initial Catalog=LP;User Id=sa; Password=admin;Persist Security Info=True;Min Pool Size=5" providerName="System.Data.SqlClient" /> (only for Windows Server 2003)
· Change DB Name to LP in SSMS (only for Windows Server 2003)
· Select version 2.0 in IIS website or Virtual Directory properties ASP.NET tab.
Make sure file permissions of the directory are given to child objects as well if contents in the directory is copied again.
IIS Setup and Configuration for Windows Server 2003
Web.config:
<add name="Lungar ProjectConnectionString" connectionString="Data Source=(local);Initial Catalog=LP;User Id=sa; Password=admin;Persist Security Info=True;Min Pool Size=5" providerName="System.Data.SqlClient" />IIS:
Set Anonymous login in directory security to Login (Machine Name)\Administrator, Password Pakistan (system password).
Labels:
asp.net,
IIS setup,
sql server,
vb,
web.config,
windows server
Working Bypass Proxy
http://www.mywebtunnel.com/
Labels:
asp.net,
bypass proxy,
deployment to IIS,
sql server,
vb,
web tunnel proxy
IIS 5 not re-installing from windows CD, giving error like cannot copy statxmem.dl_
In cmd prompt run:
esentutl /g %WinDir%\security\database\secedit.sdb
esentutl /p %windir%\security\database\secedit.sdb
http://p2p.wrox.com/general-net/27450-iis-installation-problem.html
esentutl /g %WinDir%\security\database\secedit.sdb
esentutl /p %windir%\security\database\secedit.sdb
http://p2p.wrox.com/general-net/27450-iis-installation-problem.html
Labels:
asp.net,
IIS 5,
IIS error,
iis installation,
sql server,
vb,
windows CD
Register ASP.NET again – Error: Server Application Unavailable
Monitoring Current Ports on PC
Download www.nirsoft.com Currports v1.82
Labels:
asp.net,
current ports,
IIS,
monitoring ports,
nirsoft,
ports,
sql server,
vb
Subscribe to:
Posts (Atom)
Labels
.ico
(1)
acunetix
(1)
adding controls dynamically
(1)
adding list item programatically
(1)
adding parameters
(1)
aligning
(2)
aligning buttons
(1)
and Bind() can only be used in the context
(1)
anonymous access
(1)
appending static dropdownlist items
(1)
asciibetical sort
(1)
asp.net
(101)
assembly
(1)
asterisk
(1)
auto increment
(1)
autopostback
(1)
autosize
(1)
aztech
(5)
behavior
(1)
boundfield
(1)
browser tab icon
(1)
busybox
(1)
bypass proxy
(1)
calculate totals in reportviewer
(2)
cangrow
(1)
cascading style sheets
(1)
case
(1)
CDbl
(1)
changemode
(1)
checkbox
(1)
columns
(1)
comments
(1)
comparing all values
(1)
comparing integer values
(2)
comparison
(2)
conditional IIF
(1)
confirmation box on delete
(1)
connection string
(1)
control
(1)
controlID
(1)
controlparameter
(1)
convert
(1)
convert format of currency or float or 0.0000 to 0.00
(1)
convert image to pixels
(1)
converting dates
(2)
css
(1)
ctype
(1)
culture
(1)
currency
(1)
current date
(1)
current ports
(1)
data typeconversion
(1)
database
(2)
databind
(1)
databound
(5)
dataformatstring
(1)
date column
(1)
date format
(3)
date sort in gridview
(1)
db_datareader
(1)
db_datawriter
(1)
dd MMM yyyy
(1)
defaultmode
(1)
delete button
(1)
deleting
(1)
deleting rows
(1)
deploying website to IIS
(3)
deployment error
(1)
deployment to IIS
(4)
detecting formview move
(3)
difference between filterexpression and selectexpression
(2)
difference between publish and build in visual studio
(1)
directory security
(1)
display error on no data in reportviewer
(2)
distinct
(1)
DLL
(1)
DMZ
(1)
double value
(1)
double quotes in javascript
(1)
download reportviewer
(5)
download visual web developer
(3)
drill down
(1)
drilldown
(1)
drilldown dropdownlist
(1)
dropdownlist
(4)
dropdownlist showing double values on postback
(2)
DSL 605EU
(5)
dynamic DNS
(1)
dyndns
(1)
e.values
(1)
edit mode
(1)
embedded images
(1)
emptydatatemplate
(1)
enableclientscript
(1)
enableviewstate
(1)
error during selection in filter of non matching values
(1)
Eval()
(1)
event manager
(1)
excel to sql server
(2)
executiontime
(1)
expression
(2)
F5 key refresh
(1)
failed to load viewstate
(1)
favicon
(1)
favicon.ico
(1)
feedback
(1)
feedback module
(1)
field expression
(1)
file permissions
(1)
filter
(3)
filterexpression
(2)
filterparameters
(1)
findcontrol
(1)
firefox
(1)
firefox password problem
(1)
firewall
(1)
float
(1)
focus
(1)
font
(1)
footerrow
(1)
format currency
(1)
formatting date in reportviewer
(1)
formview
(11)
formviewmode
(2)
freeze screen
(1)
global ip
(2)
globals
(1)
gotreportviewer
(1)
grand total
(1)
gridview
(18)
gridview labels
(3)
handling dates
(6)
handling nulls
(5)
html
(1)
htmlencode
(1)
httphandler
(1)
icon in address bar
(1)
icon in browser
(1)
IIS
(6)
IIS 5
(2)
IIS 7
(1)
IIS admin tool
(1)
IIS error
(1)
iis installation
(1)
IIS manager
(3)
IIS personalization
(1)
IIS pool
(3)
IIS setup
(1)
IIS Unexpected error 0x8ffe2740
(1)
image control
(1)
image sizing in reportviewer
(1)
importing html into excel
(1)
index was out of range
(1)
insert
(4)
insert image in reportviewer
(1)
inserting
(1)
insertparameters
(1)
integer
(1)
integer column
(2)
intellisense
(1)
iteminserted
(1)
iteminserting
(2)
itemupdating
(2)
javascript
(6)
javascript and smartnavigation
(1)
javascript intellisense
(1)
label
(1)
left align pagerstyle
(1)
listitem
(1)
live ip
(2)
load
(1)
maintain cursor on field after postback
(1)
maintainscrollbackposition
(2)
managing deletion
(1)
microsoft
(2)
modechanged
(1)
modechanging
(1)
money column
(1)
money field
(1)
monitor IIS errors
(1)
monitoring ports
(1)
ms excel
(1)
ms word
(1)
multiple values shown
(1)
natural sort
(1)
network service
(3)
newline character in reportviewer textbox
(1)
newmode
(1)
nirsoft
(1)
no data
(1)
non focus
(1)
non null
(1)
norows property
(1)
obfuscate
(1)
obfuscator
(1)
objectdatasource
(3)
onclientclick
(1)
onfocus
(3)
onkeyup
(1)
page expiry
(1)
page margins
(1)
page_load
(1)
pageindex
(1)
panel
(1)
parameterized query
(1)
pdf
(1)
permissions
(2)
port forwarding
(2)
port scanner
(1)
ports
(2)
postback losing focus problem
(1)
pre-compile tasks visual studio
(1)
prevent insert on refresh
(1)
prevent multiple records being added
(1)
preventing doubleclick
(1)
preventing multiple clicks
(1)
primary key
(1)
primary key column
(1)
profile
(2)
programming
(1)
protect asp.net code
(2)
publickeytoken
(1)
publish to DLL
(2)
publish website
(2)
putting blanks in formview
(1)
reboot router
(1)
referencing values of selectcommand
(1)
register asp.net
(1)
registerstartupscript
(2)
remove focus
(1)
removing a textbox
(2)
report header
(1)
reportaddin.msi
(2)
reporting services
(3)
reportviewer
(11)
reportviewer formatting A4 size PDF
(1)
reportviewer formatting for A4 size PDF
(1)
reportviewer header scroll problem
(1)
reportviewer showing header
(1)
reportviewer showing header constantly
(1)
reset autokeys
(1)
restart router
(1)
router
(6)
router interface
(1)
rows
(1)
schema
(1)
scriptmanager
(1)
scroll function
(1)
scroll to window location with javascript
(1)
scrolling scrollbar with javascript
(1)
selectcommand
(1)
selectedindexchanged
(1)
selectedrowstyle
(1)
selectedvalue
(1)
selectexpression
(1)
selecting control inside gridview
(1)
selecting null as 0
(1)
selecting null as zero
(1)
selecting nulls
(3)
selecting row
(1)
selecting totals in t-sql using subquery
(2)
selecting week
(1)
server application unavailable
(1)
session state
(2)
session timeout
(1)
set focus on control on page load
(1)
setting tab order of controls
(1)
setup firewall
(1)
showtime
(2)
single quotes in javascript
(1)
sizing property
(1)
skype port 80 conflict
(1)
smartnavigation
(3)
smartnavigation errors
(1)
smartnavigation problems
(2)
smartnavigation solutions
(1)
sorting
(1)
sql server
(47)
sqldatasource
(9)
SSRS
(5)
start primary key column from 1
(1)
static ip
(1)
string value
(1)
stylesheet
(1)
subquery
(2)
summary
(1)
system.web
(1)
t-sql
(22)
tab index
(2)
tab order
(2)
table
(1)
table of contents
(1)
table wrap
(1)
tables
(1)
tcp port
(1)
TD
(1)
telnet
(1)
templatefields
(2)
ternary IIF operator
(2)
textbox
(4)
textchanged
(1)
timeout
(1)
top row
(1)
totals in gridview footer
(2)
TR-068 WAN Access
(1)
trimming values
(1)
truncate table
(1)
try catch block
(1)
updating
(1)
validation
(1)
validationsummary
(1)
vb
(76)
version
(1)
viewstate
(1)
viewstate error
(1)
virtual directory
(1)
visiblefalse
(1)
visual studio 2008
(4)
visual web developer
(5)
visual web developer 2005
(3)
vwd
(2)
watch activity
(1)
watermark
(1)
web tunnel proxy
(1)
web.config
(4)
webforms
(1)
webserver
(1)
Website Vulnerabilities
(1)
where clause
(1)
windows CD
(1)
windows server
(3)
windows vista
(2)
windows xp
(1)
wrap line
(2)
wrapping text in reportviewer textbox
(1)
xp
(2)
XPath()
(1)